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.

Thu Jan 01, 2015 7:03 am

Hi e-iceblue team,

I just downloaded your Free Spire.PDF version 3.0 for evaluation. I then test inserting images into PDF. I got an error 'Arithmetic operation resulted in an overflow.' when I tried to insert PNG or TIFF into a PDF.

Here is a simple code I used:

PdfDocument doc = new PdfDocument();
PdfSection section = doc.Sections.Add();
PdfImage image = PdfImage.FromFile(@"D:\test\test.png");
float imageWidth = image.PhysicalDimension.Width / 2;
float imageHeight = image.PhysicalDimension.Height / 2;
PdfPageBase page = section.Pages.Add();
page.Canvas.DrawImage(image, 1F, 1F, imageWidth, imageHeight);
page.Canvas.Save();
doc.SaveToFile("D:/test/Transparency.pdf");
doc.Close();

Notes:
- The same code works OK if I use a JPG file instead. The JPG picture is shown correctly in the PDF page.
- When I tried using this code with the not-free Spire.PDF.dll 3.2.31 (from the Spire.PDF Pack Hot Fix,) the code works with PNG file no problem.

In short, the bug I found is that the FREE version cannot work with PNG/TIFF images while the paid version works with all. Is this intended or is this a bug?

Your advice will be helpful for my evaluation purposes.

Yours,

Jim

blanc99
 
Posts: 1
Joined: Wed Dec 31, 2014 7:15 am

Thu Jan 01, 2015 7:10 am

Hello,

Thanks for your feedback. I have posted the issue to our Dev team, and I recommend you use the paid version to do the evaluation as there is no any limitations on it.
If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Jan 05, 2015 9:41 am

Hello,

I hope you are enjoying your Spire.PDF paid version trial. How is your evaluation progressing?
Please let me know if you have any questions or needs.
​Sincerely,
Gary
E-iceblue support team​
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDF