pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: PDF printing - page size problem
Date Tue, 15 Apr 2014 06:40:05 GMT
One more question:
Did you ever get the expected size with the 2.0 version? Or with a 1.8.x 
version?

Btw the current source code uses findRotatedCropBox(), not the mediaBox. 
The older code used both.
Tilman

Am 14.04.2014 21:07, schrieb Norbert Sándor:
> 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
>


Mime
View raw message