HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › page.break ifSpaceBelowLessThan not working
- This topic has 8 replies, 2 voices, and was last updated May 21, 2010
07:29:52 byAnonymous.
-
AuthorPosts
-
May 6, 2010 at 17:00#26385
I am trying to use the page.brake tag property ifSpaceBelowLessThan and it’s not working. The tag will break no matter what. Here is an example code.
<pd4ml:transform screenWidth="1000" pageFormat="LETTER" pageOrientation="portrait" enableTableBreaks="false" fileName="UTHSCSA COP" inline="true" pageInsets="10,5,10,5,points"> <h1>TEST of PDF Abilities</h1> <table border=1> <tr> <td>THis is a repeating table</td> </tr> <c:forEach var="i" begin="1" end="100"> <tr> <td><c:out value="${i}"/></td> </tr> <pd4ml:page.break ifSpaceBelowLessThan="1000"/> </c:forEach> </table> </pd4ml:transform>[/color]May 6, 2010 at 17:05#28005In earlier versions of PD4ML any tag between
</tr>and<tr>(not belongs to a particular table row) was ignored. But with PD4ML actual versions it should work.By the way: why do not you use TR { page-break-inside: avoid } CSS style to achieve identical result?
May 6, 2010 at 17:48#28006Well the actual problem is that I’m am using this on a dynamic jsp form. I will not know how long or short the form will be. So I wanted to basically say to page brake when there is only 100 px left on the current pdf page. This form I a combination of tables and text.
May 6, 2010 at 18:06#28007Actually in your sample you specified 1000px instead of 100px, which is quite a lot for a typical HTML document.
May 6, 2010 at 18:28#28008Yeah I have tried adjusting from 0px to 1000px and there is never any change it always just brakes on where ever I place the page.break tag regardless. I just finished downloading the newest version and dropped the .jar and .tld and no change.
May 6, 2010 at 18:32#28009Which PD4ML version do you use? You may see that in document properties of a generated PDF file.
May 6, 2010 at 18:45#28010I downloaded the current pd4ml pro version (‘pd4ml.pro.trial.360’). When I look at the pdf document properties it says it’s version 1.4. I’m not sure if thats my finder version or the pd4ml version.
PS: If I can get this working my boss will buy the real deal.
May 6, 2010 at 19:19#28011Hmm… With v360 it should work.
> Well the actual problem is that I’m am using this on a dynamic jsp form.
> I will not know how long or short the form will be. So I wanted to basically
> say to page brake when there is only 100 px left on the current pdf page.That means the form is followed by a content portion, which you would not like to “pagebreak”. I would still recommend to use CSS approach and to enclose such sensitive content parts into
<div style="page-break-inside: avoid">and</div>.If for some reason it is not acceptable, please add enable=”false” attribute to
<pd4ml:transform>tag – it should return your JSP output as HTML – and send the HTML to support pd4ml com or attach to a post in the topic.May 21, 2010 at 07:29#28012I tried it outside of a table and that works. I guess I’ll just use style=”page-break-inside: avoid” for the tables and for every thing else I’ll use page.break. Thanks for the help.
-
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.
