We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Intermitten Overflow Exception thrown By PdfGraphics.DrawImage

Thread ID:

Created:

Updated:

Platform:

Replies:

99775 Jun 9,2011 06:48 PM Jul 1,2015 12:43 AM ASP.NET Web Forms (Classic) 7
loading
Tags: PDF
James Carter
Asked On June 9, 2011 06:48 PM

Hello,


I get an Overflow Exception that occurs intermittently when calling PdfGraphics.DrawImage(). It seems to occur roughly 10% of the time. The call stack is below. Any help resolving this problem would truly be appreciated. Thanks.

Call Stack:

System.OverflowException: Arithmetic operation resulted in an overflow.
at Syncfusion.Pdf.Graphics.PdfBitmap.SaveAsRawImage()
at Syncfusion.Pdf.Graphics.PdfBitmap.SaveImageByFormat()
at Syncfusion.Pdf.Graphics.PdfBitmap.Save()
at Syncfusion.Pdf.Graphics.PdfBitmap.SetMask()
at Syncfusion.Pdf.Graphics.PdfBitmap.Save()
at Syncfusion.Pdf.Graphics.PdfGraphics.DrawImage(PdfImage image, Single x, Single y, Single width, Single height)
at Syncfusion.Pdf.Graphics.PdfGraphics.DrawImage(PdfImage image, PointF point, SizeF size)



SyncFusion Product version is 8.303.0.21


Geetha M [Syncfusion]
Replied On June 13, 2011 04:38 AM

Hi Jim,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I have placed the test sample in the following link:
ImageInsertion-548317770.zip

Could you please modify it and send back to me?

Regards,
Geetha


Søren Løfvall
Replied On August 28, 2013 06:45 AM

I'm seeing the error. I have made this small test program:
RectangleF headerRect = new RectangleF(0, 0, 48, 48);
PdfPageTemplateElement header = new PdfPageTemplateElement(headerRect);
header.Graphics.DrawImage(PdfImage.FromFile(@"Icon.png"), PointF.Empty);

When I run this I get the Overflow Exception with this call stack:
at System.IntPtr.ToInt32()
at Syncfusion.Pdf.Graphics.PdfBitmap.SaveAsRawImage()
at Syncfusion.Pdf.Graphics.PdfBitmap.SaveImage(PdfArray filters)
at Syncfusion.Pdf.Graphics.PdfBitmap.SaveImageByFormat()
at Syncfusion.Pdf.Graphics.PdfBitmap.Save()
at Syncfusion.Pdf.Graphics.PdfBitmap.SetMask()
at Syncfusion.Pdf.Graphics.PdfBitmap.Save()
at Syncfusion.Pdf.Graphics.PdfGraphics.DrawImage(PdfImage image, Single x, Single y, Single width, Single height)
at Syncfusion.Pdf.Graphics.PdfGraphics.DrawImage(PdfImage image, Single x, Single y)
at Syncfusion.Pdf.Graphics.PdfGraphics.DrawImage(PdfImage image, PointF point)
at ImageInsertion.Form1.button1_Click(Object sender, EventArgs e)

My guess is that this has to do with the fact that I'm running 64bit.

P.S. I using version 9.3

Praveenkumar H [Syncfusion]
Replied On September 1, 2013 11:55 PM

Hi Soren,

Thank you for your interest in Syncfusion products.

Could you please report this issue through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Regards,
Praveen


Dmitry Nogin
Replied On November 28, 2013 04:16 PM

Hello,
Does anybody know if this issue has been resolved? We are experiencing it after upgrading to Windows Server 2012.

Thank you.

Praveenkumar H [Syncfusion]
Replied On December 5, 2013 04:31 AM

Hi Dmitry,

 

Thank you for using syncfusion product.

 

The above reported issue has been fixed in our latest essential studio version 11.3.0.30.

Please provide us your essential studio version detail and simplified sample which reproduces the issue,it will help us to investigate further in this issue.

 

Please let me know if you need further assistance.

 

With Regards,

Praveen

 


Cuong Nguyen
Replied On June 30, 2015 12:14 AM

Hi Syncfusion Team.

Currently, I also got the same problem when I call PdfGraphics.DrawImage, the system will throw the OverflowException. This problem only happen when I run in the production server, it not happen when I run in debug mode with Visual Studio 2013.

So, please help me verify this problem and show me how to fix them.

Thanks.


Praveenkumar H [Syncfusion]
Replied On July 1, 2015 12:43 AM

Hi Cuong,

Thank you for your interest in Syncfusion products.

Could you please report this issue through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Regards,
Praveen


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;