Hello,
I use FOP to generate PDFs, and PDFBOX to print them.
Recently I switched to the trunk version, mainly because of these issues
in the current stable version:
* https://issues.apache.org/jira/browse/PDFBOX-1452
* https://issues.apache.org/jira/browse/PDFBOX-1776
* https://issues.apache.org/jira/browse/PDFBOX-1776
The trunk version fixed the above issues but has a new one: when I print
a PDF with an unusual page size, the printed page size is incorrect.
1. PDF is generated using FOP, page size is 2,76x23,62 (correct)
2. I load the PDF using PDDocument.load() then immediately save() it,
the resulting PDF has page size of 2,76x23,62 (correct)
3. pdfDocument.getPage(0).findMediaBox() returns
[0.0,0.0,198.425,1700.787] (correct)
4. But when I try to print it using /new PDFPrinter(pdfDocument,
printJob).silentPrint()/ to a virtual PdfCreator printer, then the
resulting PDF has page size of 8,26x11,69 and the content is
horizontally centered on the page. I tried physical printers as well
with the same result, the output always seems to have A4 size...
Do you have any idea how can I change the page size for printing?
Thanks for your help in advance!
Best regards:
Norbert Sándor