PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: page-break-inside: avoid Not Working
   PostPosted: 08 Oct 2009, 20:39 
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.


  Subject: Re: page-break-inside: avoid Not Working
   PostPosted: 09 Oct 2009, 19:01 
This 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.


  Subject: Re: page-break-inside: avoid Not Working
   PostPosted: 09 Oct 2009, 19:22 
It 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.


  Subject: Re: page-break-inside: avoid Not Working
   PostPosted: 01 Jun 2011, 05:41 
Hi 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


  Subject: Re: page-break-inside: avoid Not Working
   PostPosted: 24 Jun 2011, 21:25 
page-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.



[Reply]     [ 5 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share