Tilman Hausherr created PDFBOX-4099:
---------------------------------------

             Summary: Protect PDDocumentCatalog constructors
                 Key: PDFBOX-4099
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4099
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             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-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to