Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Mar 30, 2015 9:56 pm

Hi,

I am working with PDF Form fields. I add values programaticaly, save the PDF and then want to generate a preview of the document. The source PDF is attached as well as the output. Please tell me where I am doing something wrong.

I tried to add DPI x and y to the code when saving an image but it just seems to add a white bank on top and right side of the picture.

I also tried both Bitmap and MetaFile. No difference whatsoever.

Code: Select all
 ...
 var content = new byte[fi.Length];
                using (var s = fi.OpenRead())
                {
                    s.Read(content, 0, content.Length);
                }
using (var doc = new PdfDocument())
                {
                    doc.LoadFromBytes(content, file.DocumentPassword);

                    var img = doc.SaveAsImage(0, PdfImageType.Metafile);
                    doc.Close();
                    doc.Dispose();

                    img.Save(fiOut.FullName, ImageFormat.Png);
                }

bogdan.paris
 
Posts: 6
Joined: Thu Apr 10, 2014 5:26 pm
Location: New Hampshire, USA

Tue Mar 31, 2015 3:16 am

Hello,

Thanks for your inquiry.
I have reproduced your issue, sorry. I have posted the issue to our dev team. We will inform you immediately when it is fixed.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Wed Apr 08, 2015 3:57 pm

Hi,

Any updates on this? I am waiting on this to push live a major update to our software. And i can't release it with the buggy version.

Thanks,

bogdan.paris
 
Posts: 6
Joined: Thu Apr 10, 2014 5:26 pm
Location: New Hampshire, USA

Thu Apr 09, 2015 2:23 am

Hello,

Thanks for your inquiry.
The issue you reported has been resolved. The new version which includes the fix is under testing now. We will release it and inform you when the new version passes all test cases.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Tue Apr 21, 2015 8:44 am

Hello,

Sorry to keep you waiting.
Our development team has solved your problem. Please test the below new package:
http://www.e-iceblue.com/downloads/temp ... .2.183.zip
If there are any questions, welcome to get it back to us.

Sincerely,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.PDF