|
Rank: Newbie Groups: Member
Joined: 5/21/2014 Posts: 5
|
hi,
I am converting the html file to PDF , got the error "PDF Conversion failed. A generic error occurred in GDI+". how to resolve this?
My Code is
HtmlToPdf.Options.OutputArea = New System.Drawing.RectangleF(0.1F, 0.1F, 8.3F, 10.8F)
HtmlToPdf.ConvertUrl(copyfolderpath + htmlfilename, copyfolderpath + pdffilename)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, This particular error can be very misleading and it can be caused by that your application does not have the permission to write the file. Try to pass a PdfDocument object as the second argument and see if it works:
Code: C#
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertUrl(copyfolderpath + htmlfilename, doc);
Please let us know if this is the problem. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/21/2014 Posts: 5
|
hi,
Your code is not working.
My code is working for all other files.
It is not working for one particular type of html,
please provide a link to upload the file and let me know the issue. This file conversion was working till yesterday, all of the sudden it is not working.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, In that case you can try to isolate the problem into a test HTML file and send the test file to us. We will then try to run it here and see what we can find. See here for more information on how to send test files to us: https://www.essentialobjects.com/forum/test_project.aspxYou may also want to try the latest build to see if the latest build already resolves the issue for you. Thanks!
|
|