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
|