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

Adam Nichols closed PDFBOX-232.
-------------------------------

      Assignee: Adam Nichols
    Resolution: Fixed

This was already added at some point (it's currently on line 253 of 
PDFMergerUtility.java), just cleaning up JIRA.

> NPE in PDFMergerUtility
> -----------------------
>
>                 Key: PDFBOX-232
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-232
>             Project: PDFBox
>          Issue Type: Bug
>            Assignee: Adam Nichols
>            Priority: Minor
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1632884
> Originally submitted by jmawebb on 2007-01-10 19:37.
> I'm seeing exceptions like this when merging certain documents:
> java.lang.NullPointerException
>         at 
> org.pdfbox.util.PDFMergerUtility.mergeAcroForm(PDFMergerUtility.java:412)
>         at 
> org.pdfbox.util.PDFMergerUtility.appendDocument(PDFMergerUtility.java:210)
>         at 
> org.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:148)
> It looks like it's fine just to add this check on line 208 of 
> PDFMergerUtility.java, unless there's a deeper cause:
> -        else
> +        else if( srcAcroForm != null )
> [comment on SourceForge]
> Originally sent by bwingenroth.
> Logged In: YES 
> user_id=843437
> Originator: NO
> I had this same problem and found the same result.  There are certain PDFs 
> which, for reasons unknown to me, cause this NullPointerException and don't 
> get appended to the resulting PDF file.  I downloaded and modified the 
> PDFMergerUtility.java file in PDFBox-0.7.4-dev-20070525 and now I get the 
> expected behavior: no NPE and the PDF gets appended to the resulting PDF.
> I don't have any insight regarding any deeper causes for the NPE, but I can 
> confirm that this suggested patch worked for me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to