Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.7, 2.0.0
-
Windows
Description
Merging 2 PDF documents leads to a null pointer exception:
From my point of view the PDF document misses the xref and startxref tag.
java -jar pdfbox-app-1.8.1.jar PDFMerger "bid.pdf" "2nd Testfile.pdf" output.pdf
Mai 08, 2013 12:52:03 PM org.apache.pdfbox.pdfparser.XrefTrailerResolver setTrailer
WARNING: Cannot add trailer because XRef start was not signalled.
Mai 08, 2013 12:52:03 PM org.apache.pdfbox.pdfparser.XrefTrailerResolver setStartxref
WARNING: Did not found XRef object at specified startxref position 0
PDFMerger failed with the following exception:
java.lang.NullPointerException
at org.apache.pdfbox.util.PDFMergerUtility.appendDocument(PDFMergerUtility.java:257)
at org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:188)
at org.apache.pdfbox.PDFMerger.merge(PDFMerger.java:68)
at org.apache.pdfbox.PDFMerger.main(PDFMerger.java:44)
at org.apache.pdfbox.PDFBox.main(PDFBox.java:83)