Waq lala wrote:
well i didn't find any method to get the ByteArrayOutputStream will
you plz dicuss it in detail
???
Yesterday, you wrote:
pdfOutputStream = new ByteArrayOutputStream();
Document doc = new Document();
PdfWriter writer = writer.getInstance(doc, pdfOutputStream);
doc.open();
doc.add(new Phrase("Thgis ia kdjfalkdjflkajlkdj jadflkjaslkdjfk adlkfjas
ldjflkadflkjaslkdfj"));
doc.close();
OutputStream outStream = Object.getBinaryOutputStream();
pdfOutputStream.writeTo(outStream);
outStream.close();
So you created a ByteArrayOutputStream and that way you obtained
an object pdfOutputStream that can be written to another OutputStream
or retrieved as byte[]. Why are you saying 'you can't find any method to
get the ByteArrayOutputStream'? You are contradicting yourself.
What you say just doesn't make sense. You are wasting valuable time!
Anyway, I see in your last code sample that you can get an OutputStream
from your BLOB object class:
OutputStream outStream = dbObject.getBinaryOutputStream();
You can write the PDF to this outStream object directly without
using a ByteArrayOutputStream as intermediary 'storage'.
You could use something like this:
Document doc = new Document();
PdfWriter writer = writer.getInstance(doc,
dbObject.getBinaryOutputStream());
doc.open();
doc.add(new Phrase("Thgis ia kdjfalkdjflkajlkdj jadflkjaslkdjfk adlkfjas
ldjflkadflkjaslkdfj"));
doc.close();
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions