You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/02/06 19:55:00 UTC
[jira] [Commented] (PDFBOX-4099) Protect PDDocumentCatalog
constructors
[ https://issues.apache.org/jira/browse/PDFBOX-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354467#comment-16354467 ]
ASF subversion and git services commented on PDFBOX-4099:
---------------------------------------------------------
Commit 1823383 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1823383 ]
PDFBOX-4099: make constructors protected
> 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