Welcome Guest Search | Active Topics | Sign In | Register

calculate content height Options
soppie
Posted: Thursday, June 9, 2011 3:29:35 AM
Rank: Newbie
Groups: Member

Joined: 6/9/2011
Posts: 9
Hi,

we use other pdf generating objects for merging DB data and html to pdf. One of the most used features is calculating the height of a contentblock before rendering. This is used to detect if a content block can be rendered on the available page space after rendering content before this point. If not, we add a new page and start on top of the new page. Is this possible with e0.pdf?

thx!
eo_support
Posted: Thursday, June 9, 2011 8:24:33 AM
Rank: Administration
Groups: Administration

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

Yes. You can do that. The most reliable way to calculate the content height is to render it on a separate PdfDocument object in memory. You would then get the output height from that PdfDocument object but discard the PdfDocument object itself.

If you use our HTML to PDF feature, then you almost never need to worry about the page break. We will handle page breaks automatically. See here for more details:

http://doc.essentialobjects.com/library/4/htmltopdf/paging.aspx

Hope this helps. Please feel free to let us know if you have any more questions.

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.