FOP has options to create PDF files and to send output directly to the
printer.  If those are working for you, I'm not sure why you might need
PDFBox.
I use the PDFBox project because FOP sending output directly to the
printer didn't work for me.  In one case it went to the wrong printer.
In another case it went to the wrong tray.
I used the FOP option to send the output to a ByteArrayOutputStream
instead, read the data from that stream into a ByteArrayInputStream
which works as input for PDFBox which creates a Pageable object, which I
was able to pass in to the Java print methods which gave me more control
over the output.
The PDFBox object can be saved as a PDF file, but the FOP
ByteArrayOutputStream can also be redirected to a FileOutputStream to
save directly.  I'm not sure what advantage PDFBox might have there.
One possible advantage would be to have the output saved in a Pageable
reuseable object if perhaps you want to send the same report to 2
different printers.

________________________________

From: Steffanina, Jeff [mailto:[email protected]] 
Sent: Thursday, December 02, 2010 9:19 AM
To: [email protected]
Subject: Using PDFBox




I saw some references to Apache PDFBox and took a look at it.   I
currently use FOP / XSLT, etc to generate printed documents.  

Is there some specific feature(s) of PDFBox that I should take a closer
look at???   


Jeff 

  • Using PDFBox Steffanina, Jeff
    • RE: Using PDFBox Eric Douglas

Reply via email to