Welcome Guest Search | Active Topics | Sign In | Register

Convert problem with big html files Options
NormShield
Posted: Friday, April 22, 2016 5:00:21 AM
Rank: Newbie
Groups: Member

Joined: 4/22/2016
Posts: 1
Hi,
I bought the DLL recently. It is fine to converting html files to pdf up to 150 pages. But I get error with bigger html conversion (same page with much html content). What is the meaning of error? and What can I do to fix it?

Here is my code:

HtmlToPdfOptions options = new HtmlToPdfOptions();
options.MaxLoadWaitTime = int.MaxValue;
options.ZoomLevel = .7f; //olay bu
SizeF pageSize = PdfPageSizes.A4;
float marginLeft = 0.5f;
float marginTop = 0.5f;
float marginRight = 0.5f;
float marginBottom = 0.5f;
options.PageSize = pageSize;
options.OutputArea = new RectangleF(marginLeft, marginTop, pageSize.Width - marginLeft - marginRight, pageSize.Height - marginTop - marginBottom);
HtmlToPdf.ConvertUrl(url, pdfFilePath, options);

And here is the error:

Conversion failed. Conversion failed. error code = 7. System.Exception: Incorrect object end marker
at EO.Internal.akx.a(PdfDocumentSecurity A_0)
at EO.Internal.akx.a(Boolean A_0, Boolean A_1, PdfDocumentSecurity A_2)
at EO.Internal.fz.a(Stream A_0, Boolean A_1, Boolean A_2)
at EO.Internal.fz..ctor(Stream A_0, PdfDocumentSecurity A_1, Boolean A_2, Boolean A_3)
at EO.Internal.o0.b.a(b A_0, a A_1, b A_2)
at EO.Internal.o0.e.a.a(Object A_0)
EO.Pdf.HtmlToPdfException: Conversion failed. Conversion failed. error code = 7. System.Exception: Incorrect object end marker
at EO.Internal.akx.a(PdfDocumentSecurity A_0)
at EO.Internal.akx.a(Boolean A_0, Boolean A_1, PdfDocumentSecurity A_2)
at EO.Internal.fz.a(Stream A_0, Boolean A_1, Boolean A_2)
at EO.Internal.fz..ctor(Stream A_0, PdfDocumentSecurity A_1, Boolean A_2, Boolean A_3)
at EO.Internal.o0.b.a(b A_0, a A_1, b A_2)
at EO.Internal.o0.e.a.a(Object A_0) ---> System.Exception: Conversion failed. error code = 7. System.Exception: Incorrect object end marker
at EO.Internal.akx.a(PdfDocumentSecurity A_0)
at EO.Internal.akx.a(Boolean A_0, Boolean A_1, PdfDocumentSecurity A_2)
at EO.Internal.fz.a(Stream A_0, Boolean A_1, Boolean A_2)
at EO.Internal.fz..ctor(Stream A_0, PdfDocumentSecurity A_1, Boolean A_2, Boolean A_3)
at EO.Internal.o0.b.a(b A_0, a A_1, b A_2)
at EO.Internal.o0.e.a.a(Object A_0)
at EO.Internal.o0.a(e A_0, a7s A_1, WriteArgDelegate A_2)
at EO.Internal.o0.a(HtmlToPdfOptions A_0, Single A_1, Single A_2, Size A_3, Rectangle A_4, amd A_5, List`1 A_6)
at EO.Internal.a3d.a(String A_0, Single& A_1)
at EO.Internal.a3d.d()
--- End of inner exception stack trace ---
at EO.Pdf.HtmlToPdfException.b(Exception A_0)
at EO.Internal.a3d.d()
at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options)
eo_support
Posted: Friday, April 22, 2016 10:23:09 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

This must be an out of memory error somewhere. Can you isolate the problem into a test project and then send us the test project? See here for more information on how to send test project to us:

http://essentialobjects.com/forum/test_project.aspx

As soon as we receive that we will investigate further.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.