I am sorry. With Leonard's help yesterday, I started to realize that your suggestion was exactly what I should look to do, but I was (am still) struggling with how to implement it given the iText framework. In other words, how to use a parser/tokeniser to manipulate an existing PDF [Page] and output the filtered result.
Your example is excellent (as usual), thank you. Sorry for being so obtuse, but can I ask about where this would be inserted into the overall effort? Would I: 1) Open existing PDF in PdfReader; 2) Use similar classes to OCGParser/Remover to operate on the reader; 3) Create a PdfCopy or PdfStamper to then simply copy the reader to a new output PDF (and I assume the changes made to the reader-interface would be applied to the output)? I was thinking that writing a "filter" class (extending RenderListener or similar) and maybe a way to insert that as a sort-of callback for the PdfCopy to use while copying the PDF (filtering dynamically as pages are output) was what you had envisioned when naming the class ...Listener. Thanks again, AJ On 2/16/2012 12:28 PM, iText Info wrote: > Op 16/02/2012 18:19, AJ Weber schreef: >> Is there a way, maybe to use FilteredRenderListener class to insert into >> the PdfCopy/Stamper such that as content is read from the reader, it is >> filtered prior to copying to the output pdf??? >> >> That would be very cool! > That's exactly what I've tried to explain in an earlier mail! > I've written many different parsers that did exactly that! > BUT: they are custom parser for custom purposes, and that's why you will > need to write a custom parser for your custom need. > This is an example of such code: > http://itext.svn.sourceforge.net/viewvc/itext/trunk/xtra/src/main/java/com/itextpdf/text/pdf/ocg/ > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > iText(R) is a registered trademark of 1T3XT BVBA. > Many questions posted to this list can (and will) be answered with a > reference to the iText book: http://www.itextpdf.com/book/ > Please check the keywords list before you ask for examples: > http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php