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

Maruan Sahyoun commented on PDFBOX-2633:
----------------------------------------

How it would basically work:

a) look at the content needed in the stored file after a field value has been 
changed e.g. by filling out the reader extended form with Adobe Reader. This 
will give you the objects needed to be stored as part of the increment i.e. 
added after the original file.
b) after changing the XFA set all objects needed to <setNeedToBeUpdate(true)>. 
You can review the addSignature method in PDDocument as a sample.
c) now incremental save should work for these objects as they will be (re) 
written  

> saveIncremental java.lang.NullPointerException
> ----------------------------------------------
>
>                 Key: PDFBOX-2633
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2633
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 1.8.8
>            Reporter: dennis lucero
>
> Loading a document and saving it via saveIncremental throws 
> java.lang.NullPointerException.
> PDDocument doc = PDDocument.load(input);
> doc.saveIncremental(...);
> ----
> Exception in thread "..." java.lang.NullPointerException
>       at 
> org.apache.pdfbox.pdfparser.PDFXRefStream.getStream(PDFXRefStream.java:90)
>       at 
> org.apache.pdfbox.pdfwriter.COSWriter.doWriteXRefInc(COSWriter.java:697)
>       at 
> org.apache.pdfbox.pdfwriter.COSWriter.visitFromDocument(COSWriter.java:1139)
>       at org.apache.pdfbox.cos.COSDocument.accept(COSDocument.java:578)
>       at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1516)
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1397)
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.saveIncremental(PDDocument.java:1372)
>       at ...



--
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