PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 23, 2024 11:42 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Jan 25, 2008 12:41 am 
Offline

Joined: Fri Jan 25, 2008 12:25 am
Posts: 1
Hi guys,
How do I determine the height of the content on a Page, not the height of the Page itself?

What I'm trying to do is merge 2 Pages into 1 Page IF the height of the content of Page1 + height of content of Page 2 is less than the available height on a single page.

eg: Assuming available Page height is 1000 for both Page 1 and Page 2:

- If Page 1 content height is 200, Page 2 content height is 400, merge into a single page. Page 1 takes up 20% of the page, Page takes up 40% of the page.

- If Page 1 content height is 400, Page 2 content height is 800, leave as two pages.

None of the samples I've seen describe how to do this. The TwoPagesOnOne sample does not solve this problem as it assumes each of the 2 pages take up exactly 50% of the page, whereas I need to calculate the 2 percentages and see if their sum is less than 100%.

Cheers,
Dan


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 203 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group