[
https://issues.apache.org/jira/browse/PDFBOX-1174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160793#comment-13160793
]
fasihs commented on PDFBOX-1174:
--------------------------------
After taking a closer look at the file I found the problem.
This is what I found at the end of the file (There are several appearances of
endstream but they don't seem to affect the parser) :
trailer
<</Size 2784>>
startxref
116
%%EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>GetFile</title>
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post"
action="getfile.aspx?Path=c%3a%5cDownloads%5c_Download%5cGPPR%5creports%5cGPPR164.pdf"
id="Form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTUxMTcwNzgxMGRkX3jBvL2JNxEHFBCuyf6nrcb2XD0=" />
</div>
</form>
</body>
</HTML>
After removing the lines after EOF everything works fine...
> i have problem in BaseParser.readInt
> -------------------------------------
>
> Key: PDFBOX-1174
> URL: https://issues.apache.org/jira/browse/PDFBOX-1174
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, PDModel
> Affects Versions: 1.6.0
> Reporter: ahmad makram
>
> i can't load PDF to PDDocument.load( )
> it give me this exception
> java.io.IOException: Error: Expected an integer type, actual='Fatal'
> at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1384)
> at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:517)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1069)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1036)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1007)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira