This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Fit data in a PDF page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Fit data in a PDF page" Watch "Fit data in a PDF page" New topic

Fit data in a PDF page

Ngo Thanh Hien

Joined: Mar 23, 2003
Posts: 5
Dear all,
I generate PDF report by transform XML data into XSL-FO then use Apache FOP to transform into PDF, I didn't know how to fit data (table for example) in a page, Could you help me a solution for this problem ?
Many thanks!

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Welcome to the 'ranch, Hien.
I haven't done much with FOP but I think this example shows nicely how you define the width for a table so that it's scaled to fit the page width.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Fit data in a PDF page
Similar Threads
SVG to multi page pdf
Java Api for converting Word document to PDF?
display output as pdf
How to convert blob data to image and display
How to display PDF data type with XSLT ?