You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2018/02/06 19:54:00 UTC

[jira] [Updated] (PDFBOX-4099) Protect PDDocumentCatalog constructors

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

Tilman Hausherr updated PDFBOX-4099:
------------------------------------
    Priority: Minor  (was: Major)

> Protect PDDocumentCatalog constructors
> --------------------------------------
>
>                 Key: PDFBOX-4099
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4099
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 3.0.0 PDFBox
>
>
> A guy on the user mailing list used this code:
> {code:java}
> PDDocumentCatalog pg = new PDDocumentCatalog(mergedPDF) ;
> PageMode pm = PageMode.USE_OUTLINES;
> pg.setPageMode(pm);
> {code}
> This destroyed his PDF. The only usages of the constructors are internal to PDFBox, when a document is newly created or opened. My first thought was to make the constructor package local to avoid people using this, but it would prevent subclassing (although I can't imagine why anybody would do that), so I'll make it protected instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org