Found the following on geekcredential dot wordpress dot com Groovy thinks '/0' is a GString so need to be explicit and force it to character
i.e. '/0'.toCharacter().charValue() john renfrew Right Way Up Office +44 1675 475341 Fax +44 1675 475342 Mobile +44 7767 443992 -----Original Message----- From: John Renfrew [mailto:r...@btclick.com] Sent: 02 May 2010 09:49 To: iText-questions@lists.sourceforge.net Subject: [iText-questions] FW: Examples in new book Works a dream. Thank you. john renfrew Right Way Up Office +44 1675 475341 Fax +44 1675 475342 Mobile +44 7767 443992 -----Original Message----- From: Bruno Lowagie [mailto:br...@lowagie.com] Sent: 02 May 2010 07:07 To: r...@btclick.com; Post all your questions about iText here Subject: Re: [iText-questions] Examples in new book John Renfrew wrote: > I am slowly working through the examples in the new book in my context > which is Groovy from inside Filemaker and it is a much clearer piece > of writing.. Thank you. Thanks, I decided to rewrite the second edition from scratch, based on my experience teaching iText. The organization of the first book wasn't ideal to explain how iText works in a classroom. > If I use stamper = new PdfStamper(reader, new fileOutputStream(dest)); > it works but obviously loses the reader rights > > If I add the /0, true at the end it fails, which is not a happy situation /0 is the null byte. Maybe Groovy doesn't like that. > Can you give any guidance as to what the /0 should contain. It's the version number of the new PDF file that will be created by PdfStamper. For instance, if you pass '7', the PDF header will be PDF-1.7. Passing '\0' is equivalent to saying: new PdfStamper(reader, new FileOutputStream(dest), reader.getPdfVersion(), true); So if Groovy doesn't like '\0', you can replace it with reader.getPdfVersion(). ---------------------------------------------------------------------------- -- _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/