Thanks Paulo, BTW, I am on Java 5.0 / iText 2.1.4 on a z9 machine
Paulo Soares-3 wrote: > > It looks like the sax parser behaves differently in the mainframe than in > window. I've entered a bug report so that I don't forget to look at this. > > Paulo > >> -----Original Message----- >> From: ek1975 [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, October 07, 2008 2:28 AM >> To: itext-questions@lists.sourceforge.net >> Subject: [iText-questions] Content is not allowed in trailing section >> >> >> Hello listers.... I got a weird error. I am not using any XML >> in my code. I >> am trying to create a 39barcode on a pdf. The method accepts >> ByteArrayOutputStream, String containing a barcode text, int >> position_ int >> posistion_y and returns a ByteArrayOutputStream >> It works fine on windows, but on the mainframe I get the >> following error.. >> Should I close those streams? >> >> JVMJZBL2007E Stack trace follows: >> ExceptionConverter: org.xml.sax.SAXParseException: Content is >> not allowed in >> trailing section. >> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) >> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) >> at javax.xml.parsers.DocumentBuilder.parse(Unknown Source) >> at com.lowagie.text.xml.xmp.XmpReader.<init>(Unknown Source) >> at com.lowagie.text.pdf.PdfStamperImp.close(Unknown Source) >> at com.lowagie.text.pdf.PdfStamper.close(Unknown Source) >> at zzz.barcodepgm.printbarcode39(barcodepgm.java:35) >> at xxx.yyy.testpgm.main(testpgm.java:120) >> [atal Error]:29:13: Content is not allowed in trailing section. >> >> And this is my code. I don't where this XML thing came from!!! >> <code> >> public ByteArrayOutputStream printbarcode39( >> ByteArrayOutputStream baos_in, String barcodetext, int >> posx, int posy) >> throws IOException, DocumentException { >> ByteArrayOutputStream baos_out = new ByteArrayOutputStream(); >> PdfReader reader1 = new PdfReader(baos_in.toByteArray()); >> PdfStamper stamp = new PdfStamper(reader1, baos_out); >> PdfContentByte overContent = stamp.getOverContent(1); >> Barcode39 code39ext = new Barcode39(); >> code39ext.setExtended(true); >> code39ext.setFont(null); >> code39ext.setCode(barcodetext); >> PdfTemplate tp128 = >> code39ext.createTemplateWithBarcode(overContent, null, >> null); >> overContent.addTemplate(tp128, posx, posy); >> stamp.close(); >> return baos_out; >> </code> > > > Aviso Legal: > > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter > informação confidencial ou legalmente protegida. A incorrecta transmissão > desta mensagem não significa a perca de confidencialidade. Se esta > mensagem for recebida por engano, por favor envie-a de volta para o > remetente e apague-a do seu sistema de imediato. É proibido a qualquer > pessoa que não o destinatário de usar, revelar ou distribuir qualquer > parte desta mensagem. > > > > Disclaimer: > > This message is destined exclusively to the intended receiver. It may > contain confidential or legally protected information. The incorrect > transmission of this message does not mean the loss of its > confidentiality. If this message is received by mistake, please send it > back to the sender and delete it from your system immediately. It is > forbidden to any person who is not the intended receiver to use, > distribute or copy any part of this message. > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > -- View this message in context: http://www.nabble.com/Content-is-not-allowed-in-trailing-section-tp19849522p19857440.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php