Hi James,

a) the file didn’t make it to the mailing list because of restrictions. Could 
you upload it to a public location?
b) try opening the document with PDDocument.loadNonSeq() in a simple test case 
- will it give errors?

BR
Maruan Sahyoun

Am 05.03.2014 um 15:21 schrieb James Carter <jamescar...@gmail.com>:

> When attempting to merge the attached PDF with several other documents, PDF 
> throws the following exception: Could not push back 328764 bytes in order to 
> reparse stream. Try increasing push back buffer using system property 
> org.apache.pdfbox.baseParser.pushBackSize
> 
> The discussion on the JIRA ticket (PDFBOX-1920) mentioned that the PDF is not 
> well formed. Upon increasing the pushBackSize, the following error is seen:
> 
> Exception in thread "main" java.io.IOException: expected='endstream' 
> actual='' org.apache.pdfbox.io.PushBackInputStream@45cb0cdc
> at org.apache.pdfbox.pdfparser.BaseParser.parseCOSStream(BaseParser.java:609)
> at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:605)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:194)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1219)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1186)
> at 
> org.apache.pdfbox.util.PDFMergerUtility.mergeDocuments(PDFMergerUtility.java:196)
> at com.acme.MergePDF.runSmartService(MergePDF.java:52)
> at com.acme.MergePDF.main(MergePDF.java:68)
> 
> Is this reasonably something that PDFBox could handle, or does the ill formed 
> nature of the PDF leave this outside of what PDFBox would support?
> 
> Thanks,
> James

Reply via email to