You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Rajesh Adhikari <ra...@gmail.com> on 2016/01/15 06:26:23 UTC
Regarding PDXBox API issue
Dear Team,
I have started using your APIs for one my web application project,
but i am facing some issue with this API.
I am storing the uploaded PDF Form in database in the form of BLOB & later
on when i am retrieving the same uploaded PDF in one of my method which
first loads the PDF in PDDocument using PDDocument.load(new
ByteArrayInputStream(byte[])) gives "java.io.IOException: Error:
End-of-File, expected line".
Pls. help me to resolve this issue.
Thanks,
Rajesh
Re: Regarding PDXBox API issue
Posted by Tilman Hausherr <TH...@t-online.de>.
After reading this
https://stackoverflow.com/questions/34805134/pdfbox-1-8-10-error-in-generating-pddocument-from-load-method
my bet is on the database storing / retrieval code.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: Regarding PDXBox API issue
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 15.01.2016 um 08:04 schrieb Tilman Hausherr:
> Am 15.01.2016 um 06:26 schrieb Rajesh Adhikari:
>> Dear Team,
>>
>> I have started using your APIs for one my web application
>> project,
>> but i am facing some issue with this API.
>> I am storing the uploaded PDF Form in database in the form of BLOB &
>> later
>> on when i am retrieving the same uploaded PDF in one of my method which
>> first loads the PDF in PDDocument using PDDocument.load(new
>> ByteArrayInputStream(byte[])) gives "java.io.IOException: Error:
>> End-of-File, expected line".
>
> What version are you using?
>
> What is the size of your byte[] ?
> What was the size of your PDF before storing it?
>
> What is the full stack trace?
Additionally - what happens if you save your byte[] into a .PDF file.
Can you open it with Adobe Reader?
FileOutputStream fos = new FileOutputStream (pdf_filename);
fos.write(byte_array_name);
fos.close();
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org
Re: Regarding PDXBox API issue
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 15.01.2016 um 06:26 schrieb Rajesh Adhikari:
> Dear Team,
>
> I have started using your APIs for one my web application project,
> but i am facing some issue with this API.
> I am storing the uploaded PDF Form in database in the form of BLOB & later
> on when i am retrieving the same uploaded PDF in one of my method which
> first loads the PDF in PDDocument using PDDocument.load(new
> ByteArrayInputStream(byte[])) gives "java.io.IOException: Error:
> End-of-File, expected line".
What version are you using?
What is the size of your byte[] ?
What was the size of your PDF before storing it?
What is the full stack trace?
Tilman
PS: next time, use the user mailing list. dev is for developers within
the PDFBox project.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org