Greg Critcher wrote:
You're right. It is an Oracle question. I used itext to create a pdf to the browser and it worked great. But my next step is to save the pdf to my oracle database. I have code that is compiling but it's not producing the pdf. I was hoping someone had a good sample of how to do this. My searches have resulted in many different coding samples and many problems with oracle blob's to overcome.
As Bill says: you should split up the problem in different parts: 1) Can you save a byte array (any byte array) to Oracle and retrieve it in a correct way? (Watch out for encoding problems!) Try this with the bytes of a static PDF file; is the PDF file still valid after you retrieve it from the database? 2) If so, create the PDF with a ByteArrayOutputStream. Write this output stream to a file. Is it a valid PDF? 3) If so, write the bytes of the outputstream to Oracle. If 1) and 2) work correctly, there is no reason why 3) wouldn't work correctly. I don't know what you mean by 'it's not producing the PDF'. Do you mean nothing is written to the database? Or is something is written to the database, but it's not PDF. If you are working with PdfStamper, a common mistake is to forget stamper.close(); in this case, the 0 bytes are written. Maybe you have a similar bug somewhere. br, Bruno ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
