From: bruno <bruno (at) lowagie.com>
To: Waq lala
<waqarqayyum911 (at) hotmail.com>,"'itext-questions (at) lists.sourceforge.net'"
<itext-questions (at) lists.sourceforge.net>
Subject: Re: [iText-questions] Storing document page by page in DB
Date: Mon, 15 May 2006 15:23:49 +0200
Please keep replying to the mailing list so that other subscribers can
answer too.
Waq lala wrote:
when I m using these line of code it stores in the database
PdfReader readFrom = new PdfReader("text.pdf");
merge1 = new PdfStamper(readFrom, pdfOutputStream);
merge1.close();
OK, if pdfOutputStream is of type ByteArrayOutputStream,
you have created a new PDF file in memory.
OutputStream outStream = Object.getBinaryOutputStream();
pdfOutputStream.writeTo(outStream);
outStream.close();
I don't understand this Object.getBinaryOutputStream method,
This is not java.lang.Object we are talking about!
Please use another name, because java.lang.* is imported by default
and you will get an error if you invoke the non-existent static method
getBinaryOutputStream on java.lang.Object.
but when i use this method to store the document object it stores err in
the blob colunm in database. and i want to use the document object.
Blob Object = ((OracleResultSet) rs).getBLOB("OBJECTDATA");
Aha, you gave an instance of Blob the name 'Object'.
It's a big surprise to me that you succeeded to compile this code.
br,
Bruno