[ 
https://issues.apache.org/jira/browse/PDFBOX-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901940#action_12901940
 ] 

Jukka Zitting commented on PDFBOX-788:
--------------------------------------

The currentPrinterJob variable is mostly an internal implementation detail 
that's only accessed during the print() method. It needs to be an instance 
variable instead of a local method variable because otherwise the getPageFormat 
method can't access it. A more ideal design would probably be to use an inner 
class for the Pageable implementation instead of implementing the interface 
directly in PDDocument, but since that would break backwards-compatibility we 
need to keep the currentPrinterJob as an instance variable of PDDocument.

To summarize, there isn't really any need for anyone outside the PDDocument 
class to access the currentPrinterJob variable, so to maintain proper 
encapsulation of implementation details it's best not to expose it through a 
setter or a getter.

> PrintPDF does not take the windows default printer orientation into account
> ---------------------------------------------------------------------------
>
>                 Key: PDFBOX-788
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-788
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>         Environment: Windows XP at least
>            Reporter: Christophe Borivant
>            Assignee: Jukka Zitting
>             Fix For: 1.3.0
>
>         Attachments: PDDocument.patch, PDFBOX-788.diff
>
>
> We have 2 printers, the first one is defined to print in Portrait by default 
> in Windows, the other one is defined to print in Landscape by default in 
> Windows.
> PrintPDF does not take the default configuration into account.
> I wrote a little patch that seems to solve this bug

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to