PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Sep 26, 2024 3:27 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jun 20, 2011 1:56 pm 
Offline

Joined: Mon Jun 20, 2011 1:45 pm
Posts: 1
I'm getting a generic GDI+ exception that seems to be environmental in nature.

Has anyone else encountered this?

The exception is as follows:
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at PdfSharp.Pdf.Advanced.PdfImage.InitializeJpeg()
at PdfSharp.Pdf.Advanced.PdfImage..ctor(PdfDocument document, XImage image)
at PdfSharp.Pdf.Advanced.PdfImageTable.GetImage(XImage image)
at PdfSharp.Pdf.PdfPage.GetImageName(XImage image)
at PdfSharp.Drawing.Pdf.XGraphicsPdfRenderer.Realize(XImage image)
at PdfSharp.Drawing.Pdf.XGraphicsPdfRenderer.DrawImage(XImage image, Double x, Double y, Double width, Double height)
at PdfSharp.Drawing.XGraphics.DrawImage(XImage image, Double x, Double y, Double width, Double height)
at PdfSharp.Drawing.XGraphics.DrawImage(XImage image, XRect rect)
[my code...]


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2012 9:15 pm 
Offline

Joined: Mon Mar 08, 2010 5:46 pm
Posts: 5
I was getting the same error message. I was only able to resolve it by changing the format of my image. Instead of using a .jpg image, I converted it to a .png image and everything worked just fine.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group