[
https://issues.apache.org/jira/browse/PDFBOX-1448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thorsten Hake updated PDFBOX-1448:
----------------------------------
Attachment: apachePDFBoxOrientationPatch.patch
The attached patch shows a possible implementation of this functionality, it
was inspired by PDFBOX-985:
I've added the interface "OrientationResolver" together with two basic
implementations of it DocumentOrientationResolver and
PrinterServiceOrientationResolver. The interfaces of PDPageable and PDDocument
have been extended to allow to pass a specific OrientationResolver which is
able to determine the orientation of the pages to be printed. The patch doesn't
break the API compatibility.
Please have a look at the attached patch, it is based on version 1.7.1 .
> Printing based on the document orientation
> ------------------------------------------
>
> Key: PDFBOX-1448
> URL: https://issues.apache.org/jira/browse/PDFBOX-1448
> Project: PDFBox
> Issue Type: Improvement
> Components: PDModel
> Affects Versions: 1.7.1
> Reporter: Thorsten Hake
> Attachments: apachePDFBoxOrientationPatch.patch
>
>
> We are using PDFBox in our current project to print a pdf file directly to an
> attached network printer. Printing PDF documents having only portrait pages
> within worked like a charm.
>
> However we experienced problems with PDFs having LANDSCAPE pages defined, as
> the orientation is currently always defined by the printer service and not by
> the PDDocument. This may be desireable in some situations but undesirable in
> others. Printing PDFs with PORTRAIT and LANDSCAPE pages in one document may
> lead to strange print results as the landscape pages are truncated to a
> PORTRAIT width.
> It would be good to have a possibility to change the mechanism how the
> orientation will be determined. This also would allow to fix the following
> bugs without breaking the current semantics:
> PDFBOX-985
> PDFBOX-819
> PDFBOX-222
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira