Page break on a PDF file dynamically created from XML. ! Urgent

M

Manoj Nair

I create XML file on the fly using Java. The XML file is fed into a
XSLT/FOP transformer to create a PDF file. At the end of the XML is
tags for a address block. I want the complete ( 4 lines ) of address
block to come on a new page if there is no space on the previous page.
Right now the address block breaks into say 2 line on page 1 and the
remaining 2 lines on page 2. I dont know the size of the data which
will be shown on page 1 ( its dynamic ). How should I check the number
of lines printed on PDF so that I can put a page break if it exceeds
say 30 lines?

Thanks in advance
 
J

john farrow

Put the four lines of the address into a separate fo:block which has
keep-together='always' on.

Or set widows='4' or orphans='4'

Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New
Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand
phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com
 
M

Manoj Nair

john farrow said:
Put the four lines of the address into a separate fo:block which has
keep-together='always' on.

Or set widows='4' or orphans='4'

Visual Programming Ltd mail PO Box 22-222, Khandallah, Wellington, New
Zealand site Level 2, 2 Ganges Road, Khandallah, Wellington, New Zealand
phone +64 4 479 1738 fax +64 4 479 1294 web http://www.xmlpdf.com


I tried the keep-with-next.within-page="always" property but that
doesnt work. I am using the latest FOP processor .20.5 version and it
looks like some of these standards are not implemented.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top