You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Anmol Aggarwal (Jira)" <ji...@apache.org> on 2021/12/27 06:26:00 UTC
[jira] [Commented] (PDFBOX-4203) java.io.IOException: Error: Header doesn't contain versioninfo
[ https://issues.apache.org/jira/browse/PDFBOX-4203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17465539#comment-17465539 ]
Anmol Aggarwal commented on PDFBOX-4203:
----------------------------------------
Hi I am facing this issue again:
> Exception in thread "main" java.io.IOException: Error: Header doesn't > contain versioninfo org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:221) > > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1070) > > org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1008) > >
I have 10 individual pdf files having names as A/1.pdf , A/2.pdf , A/3.pdf and so on upto A/10/pdf.
Now I have to merge these 10 pdfs so I use PdfMergerUtility to merge the inputstream of these files.
After that on mergedInputstream , I called PDDocument.load(mergedInputStream) and got this error
> java.io.IOException: Error: Header doesn't contain versioninfo
> ---------------------------------------------------------------
>
> Key: PDFBOX-4203
> URL: https://issues.apache.org/jira/browse/PDFBOX-4203
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Reporter: Chenyue Gao
> Priority: Major
>
> When I load a PDF file with PDDocument.load(), it throws the following exception. This PDF can be opened with Adobe Reader or browsers with no issues. Sorry, I can't share the PDF because it contains confidential information.
> [2018-04-19 12:06:35] java.io.IOException: Error: Header doesn't contain versioninfo
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:235)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1012)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:968)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:916)
> at com.utilities.PDFUtilities.addPackingSlipPDPage(PDFUtilities.java:279)
> at com.commands.PrintPackingSlipToPDFCommand.run(PrintPackingSlipToPDFCommand.java:103)
> at com.commands.AbstractCommand.execute(AbstractCommand.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org