What is in the buffer with 0.95? I suspect its a "nearly static" string. Something like "paint the page white, set the stroke and fill color to our internal defaults"... that sort of thing. The "paint the page white" section will vary based on the size of the page in question, but some RegEx-fu would clear that right up.
If you want to get fancy and be Technically Correct (and burn an extra 5-10 hours climbing a learning curve), you could use com.lowagie.text.pdf.PdfContentParser (or a derivative of *.pdf.parser.PdfContentProcessor) to look for commands that Actually Draw Something... there are quite a few. Even then, you might still incorrectly identify a "blank page". For example, if there's a clipping region, and everything is drawn outside it: A: Bad PDF producer. Bad! No biscuit! B: This technique would miss it. --Mark Storer Senior Software Engineer Cardiff.com #include <disclaimer> typedef std::Disclaimer<Cardiff> DisCard; > -----Original Message----- > From: mcgm [mailto:[email protected]] > Sent: Sunday, November 15, 2009 10:27 PM > To: [email protected] > Subject: [iText-questions] Detecting a blank page in a pdf > created using > FOP 0.95 > > > > Hello!! > > We use FOP-0.95 to generate pdf and then treat them with > itext to place a > watermark. We have some blank pages which should not carry > watermarks and > need to know how to distinguish the blank pages of those > which have real > content. > > We tested a solution that was proposed at the forum, checking > the internal > buffer size. It worked with older versions of FOP but not with 0.95. > > Thanks in advance!!! > -- > View this message in context: > http://old.nabble.com/Detecting-a-blank-page-in-a-pdf-created- using-FOP-0.95-tp26333484p26333484.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/
