473,386 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
Jul 20 '05 #1
2 5220
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
"Manoj Nair" <de*******@yahoo.com> wrote in message
news:92**************************@posting.google.c om...
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

Jul 20 '05 #2
"john farrow" <jo*********@xmldpf.com> wrote in message news:<jC******************@news02.tsnz.net>...
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
"Manoj Nair" <de*******@yahoo.com> wrote in message
news:92**************************@posting.google.c om...
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

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.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
1
by: Scanner2001 | last post by:
I am trying to insert a printer page break inside of a form. I do not seem to be able to do this. My form contains 3 asp panels. Each of the panels have dynamically built content, and they are...
0
by: Epson Barnett | last post by:
I'm new to ASP.NET and have run across a problem several times while working on web apps. I often need to create content dynamically (based on an event) which contains dynamically created...
7
by: Ryan Taylor | last post by:
Hi. I have some code that dynamically generates a PDF and spits this content directly to the web browser. I use HTMLDoc to create the Pdf's from html. So the user can click on a button "Print...
2
by: Raghu Raman | last post by:
Hi, In my asp .net page am using many controls and a grid.i populate many html controls innside the grid dynamically .if i click the grid ,it wll go to other page using onclick client side...
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
0
by: vijendra | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file?I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
14
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So,...
7
by: =?Utf-8?B?aXdlYg==?= | last post by:
Can we set page breaks in ASP Pages dynamically based on the data being populated? Akshay.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.