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

tmjee commented on PDFBOX-2857:
-------------------------------

Also when we do 
{code:borderStyle=solid}
   doc.saveIncremental(fos);
{code}

we get 
{code:borderStyle=solid}
Exception in thread "main" java.lang.NullPointerException
        at 
org.apache.pdfbox.pdfparser.PDFXRefStream.getStream(PDFXRefStream.java:88)
        at 
org.apache.pdfbox.pdfwriter.COSWriter.doWriteXRefInc(COSWriter.java:630)
        at 
org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1045)
        at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:428)
        at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1315)
        at 
org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1101)
        at com.innovit.playground.pdfboxtrial.Main6.main(Main6.java:57)
{code}

Not sure if I'm using PDFBox correctly or is this a bug.

> Saving XFA document caused prompt saying Extended features has been disabled
> ----------------------------------------------------------------------------
>
>                 Key: PDFBOX-2857
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2857
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.8.9, 2.0.0
>         Environment: Windows, Linux
>            Reporter: tmjee
>
> Using the following code to read and write back a pdf (with xfa) caused the 
> newly written pdf when opened be prompted with 
> "This document enabled extended features in Adobe Reader. The document has 
> been changed since it was created and use of extended features is no longer 
> available. Please contact the author for the original version of this 
> document".
> {code:title=Bar.java|borderStyle=solid}
> File f1 = new File(...);
> PDDocument doc = PDDocument.load(f1);
> doc.setAllSecurityToBeRemoved(true);
> File f = new File(....); // output file
> try (FileOutputStream fos = new FileOutputStream(f)) {
>    doc.save(fos);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to