[ 
https://issues.apache.org/jira/browse/PDFBOX-5202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-5202:
------------------------------------
    Summary: PDPageable Landscape document rotated 270° on label printer  (was: 
PDPageable Landscape document rotated 270°)

> PDPageable Landscape document rotated 270° on label printer
> -----------------------------------------------------------
>
>                 Key: PDFBOX-5202
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5202
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.23, 3.0.0 PDFBox
>         Environment: Windows 10, Windows Server 16, OpenJDK 11.0.11
>            Reporter: Benjamin Judas
>            Priority: Major
>              Labels: print, printing
>         Attachments: 10_5_Q.pdf, 10_5_Q_Printout.TIF, 
> Testprint_Landscape.TIF, Testprint_Portrait.TIF
>
>
> When printing a PDF in landscape orientation, the document is rotated 270° 
> clockwise. Printing a document in portrait orientation works fine.
> I already tried a few workarounds (as found here in this tracker and on 
> stackoverflow) but none helped: setting rotation, setting orientation 
> depending on rotation and edge length, etc.
> What I found out by adding excessive logging with diagnostic data to a quick 
> and dirty diagnostic application is that the Page format and orientation of 
> the document are recognized correctly (for example 100mm x 50mm, landscape) 
> but the assigned Paper-Object gets (50mm x 100mm):
> {noformat}
> C:\Users\BJudas\Downloads\ph>java -jar PrintingHub-2020.12.7.jar print 
> com.zellner.printinghub.doclocation.RemotePDF http://dvzsvmintra/10_5_Q.pdf 
> "ELOTiffDrucker"
> Mai 31, 2021 11:24:53 VORM. com.zellner.printinghub.doclocation.RemotePDF 
> loadRemoteDocument
> INFORMATION: Page: 0: 100mm x 50.0mm, Rotation 0
> Mai 31, 2021 11:24:53 VORM. com.zellner.printinghub.PrintingHub printDocument
> INFORMATION: Page Format 100mm x 50.0mm, Landscape, Paper: Size: 50.0mm x 
> 100mm, Imageable is 50.0mm x 100mm @ (0mm, 0mm){noformat}
> I can reproduce this problem with a physical printer (CAB-Label-Printer) and 
> a Software-TIFF-Printer with various PDF-Files generated by different 
> applications/systems/libraries.
> This is basically the code used to create the Pageable and to print it:
> {code:java}
> byte[] rawData; // PDF-data read via HttpClient from a URL somewhere in the 
> company network
> String printService = "ELOTiffDrucker";
> PDDocument pddoc = Loader.loadPDF(rawData);
> Pageable pageable = new PDFPageable(pddoc);
> PrinterJob job = PrinterJob.getPrinterJob();
> job.setPageable(pageable);
> job.setPrintService(printService);
> job.setJobName("Print Job");
> job.print();
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to