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

Tilman Hausherr commented on PDFBOX-4443:
-----------------------------------------

Try opening your PDF file with a tool like NOTEPAD++. The file should start 
like this:
{noformat}
%PDF-1.4
%âãÏÓ
3 0 obj<</P 4 0 R/Subtype/Widget/T(Signature1)/V 1 0 R/F 
132/Type/Annot/FT/Sig/DR<<>>/Rect[0 0 0 0]/AP<</N 2 0 R>>>>
endobj
1 0 obj<</Contents 
…
{noformat}
The details can be different, but "%PDF-" must be there, and a version number.

> Error: End-of-File, expected line
> ---------------------------------
>
>                 Key: PDFBOX-4443
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4443
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 2.0.13
>         Environment: Linux
>            Reporter: Dinesh
>            Priority: Critical
>              Labels: linux
>
> I am using the latest version of pdfbox.
> I am able to extraxt the file as normal stream in java 8 and open as pdf.
> But when try to load with pdfbox getting below error
> Getting this exception when filename is passed from shell script in linux.
> java.io.IOException: Error: End-of-File, expected line
>  at org.apache.pdfbox.pdfparser.BaseParser.readLine(BaseParser.java:1121) 
> ~[pdfbox-2.0.13.jar:2.0.13]
>  at org.apache.pdfbox.pdfparser.COSParser.parseHeader(COSParser.java:2574) 
> ~[pdfbox-2.0.13.jar:2.0.13]
>  at org.apache.pdfbox.pdfparser.COSParser.parsePDFHeader(COSParser.java:2553) 
> ~[pdfbox-2.0.13.jar:2.0.13]
>  at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:219) 
> ~[pdfbox-2.0.13.jar:2.0.13]
>  at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1200) 
> ~[pdfbox-2.0.13.jar:2.0.13]
>  at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1173) 
> ~[pdfbox-2.0.13.jar:2.0.13]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to