Good Morning, I have a oracle.sql.ARRAY as input param and I would like to create PDF document from this array and return to plsql a oracle.sql.BLOB object. I have been tring the code below, but it does not work. I get ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException I think it is when I close the document or when I try to put the bytearray into the blob.
Any ideals will help. Thanks public static BLOB pdf(oracle.sql.ARRAY lines, oracle.sql.ARRAY defOptions) throws DocumentException { Document document = null; PdfWriter writer = null; oracle.sql.BLOB vRetBlob = null; ByteArrayOutputStream baosPDF = null; . . . . document = new Document(MEDIA, rm, lm, tm, bm); writer = PdfWriter.getInstance(document, baosPDF); document.open(); PdfContentByte cb = writer.getDirectContent(); PdfTemplate template = cb.createTemplate(25, 25); . . . . document.add(new Paragraph(11, lineText[i], fontDefFont)); . . . . document.close(); . . . . try { vBytes = vRetBlob.setBytes(0, baosPDF.toByteArray()); } catch (SQLException se) { System.out.println("generatePDFDocumentBytes >> " + se); } Return(vRetBlob); } Patrick O. Thurman Stephen F. Austin State University Information Technology Services Data Base Administrator Phone: (936) 468-1074 Fax: (936) 468-1117 ------------------------------------------------------------------------- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions