Welcome Guest Search | Active Topics | Sign In | Register

Second call to ConvertHtml results in blank document Options
Brad Mathews
Posted: Thursday, September 14, 2017 8:16:52 PM
Rank: Advanced Member
Groups: Member

Joined: 6/19/2013
Posts: 38
If I run the following code:

Code: Visual Basic.NET
doc = New PdfDocument()
            result = EO.Pdf.HtmlToPdf.ConvertHtml(HTML, doc)
            doc.Save(PDFFolder & FilePrefix & "_FirstPass_Save.pdf")

            doc2 = New PdfDocument()
            result = EO.Pdf.HtmlToPdf.ConvertHtml(HTML, doc2)
            doc2.Save(PDFFolder & FilePrefix & "_FirstPass_Save2.pdf")


The first ConvertHtml will result in my 800 page pdf as expected.

The second will get me a single blank page.

v2015 wasn't doing this to me, but I am using a demo of version of 2017.2.43 at the moment.

- Brad
eo_support
Posted: Friday, September 15, 2017 10:38:15 AM
Rank: Administration
Groups: Administration

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

We are not aware of such issues. You can try to create a test app and send the test app to us:

https://www.essentialobjects.com/forum/test_project.aspx

We will take a look as soon as we have that.

Thanks!
Brad Mathews
Posted: Friday, September 15, 2017 1:47:13 PM
Rank: Advanced Member
Groups: Member

Joined: 6/19/2013
Posts: 38
I realized why 2015 wasn't doing this to me, I was passing a HtmlToPdf.Options into each conversion, but I cannot do that anymore since my second conversion is now using RenderAsPDF instead of ConvertHtml.

I think this is related to this: https://www.essentialobjects.com/forum/postsm44109_Margins-getting-reset-between-a-ConvertHtml-and-RenderAsPDF.aspx since the fix for that is to set the HtmlToPdf.Options again.

- Brad


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.