You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Swapnil Raverkar <sw...@gmail.com> on 2015/02/26 08:02:56 UTC

Error: Header doesn't contain versioninfo

Hi,

We are randomly getting following exception while parsing PDF documents. We
observed that we get this exception while parsing multiple files
concurrently :

"Error: Header doesn't contain versioninfo"


Caused by: java.io.IOException: Error: Header doesn't contain versioninfo

at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:339)

at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:177)

at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1214)

at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1181)

at com.apple.ist.acss.core.encoder.impl.EncoderHelper.a(SourceFile:149)

... 19 more



Any pointers / solutions on this would be really helpful.



Thanks,

Swapnil

Re: Error: Header doesn't contain versioninfo

Posted by Tilman Hausherr <TH...@t-online.de>.
The beginning of the PDF is OK.

I assume you're not using the latest version (1.8.8.). However I don't 
know if that is the cause. You are using this call:

          public static PDDocument load( InputStream input )

Make sure that you are really reading a PDF from the start when working 
concurrently, and make sure that it is correct, i.e this "EncoderHelper" 
is working properly. Maybe save your stream somewhere and create a new 
stream, just to see whether this stream contains the correct stuff.

Tilman

Am 26.02.2015 um 08:26 schrieb Swapnil Raverkar:
> %PDF-1.3
> %«Ïè¢
> 8 0 obj
>
> On 25 February 2015 at 23:23, Tilman Hausherr <TH...@t-online.de> wrote:
>
>> Please upload the PDF somewhere, or open it in an editor and copy & paste
>> the first three lines.
>>
>> Tilman
>>
>> Am 26.02.2015 um 08:02 schrieb Swapnil Raverkar:
>>
>>   Hi,
>>> We are randomly getting following exception while parsing PDF documents.
>>> We
>>> observed that we get this exception while parsing multiple files
>>> concurrently :
>>>
>>> "Error: Header doesn't contain versioninfo"
>>>
>>>
>>> Caused by: java.io.IOException: Error: Header doesn't contain versioninfo
>>>
>>> at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:339)
>>>
>>> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:177)
>>>
>>> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1214)
>>>
>>> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1181)
>>>
>>> at com.apple.ist.acss.core.encoder.impl.EncoderHelper.a(SourceFile:149)
>>>
>>> ... 19 more
>>>
>>>
>>>
>>> Any pointers / solutions on this would be really helpful.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Swapnil
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Error: Header doesn't contain versioninfo

Posted by Swapnil Raverkar <sw...@gmail.com>.
%PDF-1.3
%«Ïè¢
8 0 obj

On 25 February 2015 at 23:23, Tilman Hausherr <TH...@t-online.de> wrote:

> Please upload the PDF somewhere, or open it in an editor and copy & paste
> the first three lines.
>
> Tilman
>
> Am 26.02.2015 um 08:02 schrieb Swapnil Raverkar:
>
>  Hi,
>>
>> We are randomly getting following exception while parsing PDF documents.
>> We
>> observed that we get this exception while parsing multiple files
>> concurrently :
>>
>> "Error: Header doesn't contain versioninfo"
>>
>>
>> Caused by: java.io.IOException: Error: Header doesn't contain versioninfo
>>
>> at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:339)
>>
>> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:177)
>>
>> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1214)
>>
>> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1181)
>>
>> at com.apple.ist.acss.core.encoder.impl.EncoderHelper.a(SourceFile:149)
>>
>> ... 19 more
>>
>>
>>
>> Any pointers / solutions on this would be really helpful.
>>
>>
>>
>> Thanks,
>>
>> Swapnil
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Error: Header doesn't contain versioninfo

Posted by Tilman Hausherr <TH...@t-online.de>.
Please upload the PDF somewhere, or open it in an editor and copy & 
paste the first three lines.

Tilman

Am 26.02.2015 um 08:02 schrieb Swapnil Raverkar:
> Hi,
>
> We are randomly getting following exception while parsing PDF documents. We
> observed that we get this exception while parsing multiple files
> concurrently :
>
> "Error: Header doesn't contain versioninfo"
>
>
> Caused by: java.io.IOException: Error: Header doesn't contain versioninfo
>
> at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:339)
>
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:177)
>
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1214)
>
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1181)
>
> at com.apple.ist.acss.core.encoder.impl.EncoderHelper.a(SourceFile:149)
>
> ... 19 more
>
>
>
> Any pointers / solutions on this would be really helpful.
>
>
>
> Thanks,
>
> Swapnil
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org