You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2011/09/21 19:59:09 UTC

[jira] [Resolved] (PDFBOX-1111) Add Duplex and PrintScaling to viewer preferences

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

Andreas Lehmkühler resolved PDFBOX-1111.
----------------------------------------

    Resolution: Fixed
      Assignee: Andreas Lehmkühler

I added the support for duplex and print scaling based on the proposed patch in revision 1173773. I also added the usage of enumerations instead of string constants as suggested. For compatibility reasons I marked the old methods and constants as deprecated.
We should have a look at the version issue, AFAIK PDFBox defaults to version 1.4 and that's a problem if more and more features from newer will be added.

Thanks for the contribution

> Add Duplex and PrintScaling to viewer preferences
> -------------------------------------------------
>
>                 Key: PDFBOX-1111
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1111
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 1.6.0
>         Environment: Patch created on version 1.7.0-SNAPSHOT, Revision 1163182.
>            Reporter: Andrea Vacondio
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>              Labels: ViewerPreferences
>             Fix For: 1.7.0
>
>         Attachments: duplex_and_printscaling.diff
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences currently doesn't support viewer preferences Duplex and PrintScaling (defined in PDF Reference 1.7, Table 8.1). I created a simple patch to the above mentioned class including the two preferences.
> Notes:
> 1. They require pdfversion 1.7 and 1.6 respectively. I don't know if this is the reason why they are not currently available and I also don't know if there's a way in PDFBox to make sure that the document version is consistent with the version required by the preferences.
> 2. Since the target jdk version is 1.5 I suggest to refactor the viewer preferences area to use Enums instead of String constants (Ex. right now I think nothing prevents to set a READING_DIRECTION constant as a NON_FULL_SCREEN_MODE) making the code more robust.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira