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/

Reply via email to