HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › page-break-inside: avoid Not Working
- This topic has 5 replies, 3 voices, and was last updated Jun 16, 2017
16:13:55 byAnonymous.
-
AuthorPosts
-
October 8, 2009 at 18:39#26275
I am enabling the property page-break-inside: avoid using
pd4ml.enableTableBreaks(true) but still last line in the row in the table is spilled over to the next page.Thanks In Advance.
October 9, 2009 at 17:01#27554This is the code i am using
PD4ML converter = new PD4ML() ; converter.setHtmlWidth(745) ; converter.enableTableBreaks(true) ; converter.render(...) ;
Still the Table row
<tr>that only consist of 3 lines on my generated document got split within two pages, One line on first page and remaining 2 lines on next page.Does this functionality works in PD4ML, as stated by supported CSS properties page ? If yes, how ?
Thanks for your help.
October 9, 2009 at 17:22#27555It should work. Howerver there are some exceptions. For example if a row height is greater than page height. Of course, in the case it splits.
Please send to support email an HTML and PDF samples, which illustrate the issue. Thanks.
June 1, 2011 at 03:41#27556Hi PD4ML team,
I got a page-break-inside problem here:
for example, I have two tables: table1 and table 2, the are rendered in one html page, when print, table 1 is half page height, and table 2 is one and half page height. I add page-break-inside on both tables, when print with PDF, table 2 actually is not start with a new page, but after the table 1 in the same page. Interesting thing is, if table2 is one or less than one page height, it will start with new page.
Is this a bug? or just by design of pd4ml? I’m really confused.
Waiting for your response.
Thanks,
Rock
June 24, 2011 at 19:25#27557page-break-inside: avoid protects HTML element from being split.
It forces a page break before table2 if there is a chance to keep table2 not broken. If table2 height is higher than page height – it does not force a page break, as the table will be broken in any case. If also does not force a page break if table2 fits the remaining space on a page.
So if I understand you correctly, it works on your side as it should do.
If you need to force a page break, you may use
<pd4ml:page.break>tag or page-break-before: always CSS style applied to a block element.June 16, 2017 at 16:13#27558‘Page-break-inside: avoid’ on a div, written in the css, doesn’t seem to work. Is it not yet supported?
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.
