iText searches for the startxref in the last 1K of the file. See if the
array has the size of the PDF. A common problem is to get the blob from the
database as text and not as binary. Are you sure that if you get the PDF
from the database and then save it to a file it still opens?
Best Regards,
Paulo Soares
- Original Message -
From: McGowan, Jeffery M [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 8:56
Subject: [iText-questions] PdfReader error
I'm trying to take a pdf that I have stored in an oracle database and to
then use iText to alter the pdf then output it as stream to a web
client.
I'm trying to do this without using any files, only streams.
The problem I have is that although I appear to be getting the stream of
the
oracle blob; when I try to convert it to a byte[] I get this error:
java.io.IOException: PDF startxref not found.
at com.lowagie.text.pdf.PRTokeniser.getStartxref(Unknown Source)
at com.lowagie.text.pdf.PdfReader.readXref(Unknown Source)
at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
at com.lowagie.text.pdf.PdfReader.init(Unknown Source)
at Test.main(Test.java:197)
and these are the last few lines when I print the output of the pdf:
/CreationDate (D:20020506141920)
/Producer (Acrobat Distiller 4.05 for Windows)
/ModDate (D:20020506163216-04'00')
endobj
xref
0 3
00 65535 f
013590 0 n
013654 0 n
trailer
/Size 3
/ID[fd410d69fcd8f410ab0eb70c99931970fd410d69fcd8f410ab0eb70c99931970
]
startxref
173
%%EOF
It looks to me as if this is the line its looking for but can't find for
some reason.
Does anyone have any ideas about this.
Thanks.
--
Notice: This e-mail message, together with any attachments, contains
information of Merck Co., Inc. (Whitehouse Station, New Jersey, USA)
that may be confidential, proprietary copyrighted and/or legally
privileged, and is intended solely for the use of the individual or
entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by e-mail and then delete it.
==
___
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
___
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions