Welcome Guest Search | Active Topics | Sign In | Register

Put html inside pdfCreator Options
Dimo MX
Posted: Tuesday, July 25, 2017 4:11:05 AM
Rank: Newbie
Groups: Member

Joined: 7/10/2017
Posts: 2
Hi,
I'm having some issues with eo.pdf, so i would like to create some content with pdf creator, then add some content with htmlToPdf without page breaks then be able to continue with pdf creator. So i have 2 options there, the first one is to generate 3 pdfs one with the pdfCreator content, one with the htmlToPdf and the last one with the end of the document. The second is what i found iniside your documentation but is not very clear for me, there is a possibility to create a destination with the last content and use the destination to generate htmlToPdf but i'm not very sure what's the right way to do it. So i would like to know what's the less ressource consuming process and what's the right way for the second method.

Best regards
eo_support
Posted: Tuesday, July 25, 2017 9:49:34 PM
Rank: Administration
Groups: Administration

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

I am not exactly sure what you meant by creating a destination with the last content and use the destination to generate HTML to PDF. The only thing you need for the HTML to PDF is the start Y position:

https://www.essentialobjects.com/doc/eo.pdf.htmltopdfoptions.startposition.aspx

You can get this value from the last content's CreateDestination method and then get the Y value from the returned PdfDestionation object's FitRect property to get the left/top position of the last content. Note that this is the top/left position of the last content, not the bottom position of the last content. The easiest way to get around this is to use an empty block object with a very small height as the last content object. You can use that content's top position as the starting position of your HTML to PDF output.

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.