An alternative (and, IMO, a better) solution to putting the data in a hidden annotation is to put it in an embedded file/attachment in a standard format (CSV, XML, etc.). That makes it cleaner, more standard and easier to access for both you and others. (and should also be less code to write ;)
Leonard On May 17, 2008, at 6:02 AM, 1T3XT info wrote: > javaiTextUser wrote: >> This is what I need to do - >> >> 1. Create a pdf file from given data (Easy using iText) > > OK, maybe you can mark the end of the file by adding > some annotation (an invisible field?) on the last page. > >> 2. At a later point, reopen this pdf and add some more data to it >> I am not quite sure how to do this. Is there a way to get all the >> data in >> the pdf into a byte array, add more data to the byte array and >> recreate a >> pdf? > > When you reopen the document, ask the document for that > invisible field and its coordinates. Then use PdfStamper > to add new content and new pages. > > I'd also follow Bill's advice ;-) > -- > This answer is provided by 1T3XT BVBA > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Do you like iText? > Buy the iText book: http://www.1t3xt.com/docs/book.php > Or leave a tip: https://tipit.to/itexttipjar > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
