PRTokeniser throws "PDF file does not have header" message
- From: "Bruno Lowagie (iText)" <bruno (at) lowagie.com>
- Date: Tue, 07 Nov 2006 09:35:20 +0100
Sendhil Dhakshinamoorthy wrote:
> Hello
> I am using iText to read a PDF file from a WebServer, populate it
> with values using PdfStamper and display the modified PDF on the browser.
> I am getting the following error "PDF file does not have header" or
> something like that from PRTokeniser class. The code works fine when I
> read the PDF file from my hard disc but it does not work when I read it
> from WebServer.
>
> Can you let me know how would I solve this issue?
Instead of reading the PDF with PdfStamper,
try reading the file with a FileInputStream
and inspect the first bytes that are returned.
If it doesn't start with %PDF, the problem is
IO related, not iText related.
br,
Bruno
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions