bostjank
11-30-2006, 10:13 PM
Hi!
I have a problem with page breaks in our PDF reports, that are created on the fly from HTML stream (using a PDF generator) - the PDF created this way is then used by various (very important!) users for printing and arhiving.
As I mentioned there are issues with page breakes - as usually breaks are "inserted" at the end of the page, which is not OK, because there are some parts of the HTML content that must not appear on 2 pages (eg. tables).
Does anybody know of any solution that would put a page break before specific content in case there is not enough room for that content on the page? Unfortunatelly page-break-inside:avoid command (CSS2) is not supported in IE6/7 or Firefox. Probably, we'll need to calculate the remaining space on the page before each DIV and compare it to the space required by a specific DIV, but don't know how to do it exactly. Is there a method in .NET that we could use for this?
Thanks so much for your help.
Bostjan
I have a problem with page breaks in our PDF reports, that are created on the fly from HTML stream (using a PDF generator) - the PDF created this way is then used by various (very important!) users for printing and arhiving.
As I mentioned there are issues with page breakes - as usually breaks are "inserted" at the end of the page, which is not OK, because there are some parts of the HTML content that must not appear on 2 pages (eg. tables).
Does anybody know of any solution that would put a page break before specific content in case there is not enough room for that content on the page? Unfortunatelly page-break-inside:avoid command (CSS2) is not supported in IE6/7 or Firefox. Probably, we'll need to calculate the remaining space on the page before each DIV and compare it to the space required by a specific DIV, but don't know how to do it exactly. Is there a method in .NET that we could use for this?
Thanks so much for your help.
Bostjan