PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 19:00 
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]


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 19:05 
In 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?


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 19:48 
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. This form I a combination of tables and text.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 20:06 
Actually in your sample you specified 1000px instead of 100px, which is quite a lot for a typical HTML document.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 20:28 
Yeah 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.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 20:32 
Which PD4ML version do you use? You may see that in document properties of a generated PDF file.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 20:45 
I 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.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 06 May 2010, 21:19 
Hmm... 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.


  Subject: Re: page.break ifSpaceBelowLessThan not working
   PostPosted: 21 May 2010, 09:29 
I 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.


Last bumped by Anonymous on 21 May 2010, 09:29.



[Reply]     [ 9 posts ] 

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