In this case, as I said, I see that the original PDF was created with 
iText.  There is an XObject Dictionary with one Stream object ("/lm0" -- 
I'm verifying if that is always the name).

However, the end-user added their comment (and yes, I don't know why 
they didn't use a specific comment tool) with some version of Acrobat -- 
that much I do know.  I'm guessing they used the Text Edit tool or 
something instead of the Commenting or Stamp options in that app.

Too bad we can't tell when a specific object was added to the file (I 
CAN see that the modify date of the file is different from the create date).

On 2/14/2012 11:32 AM, 1T3XT BVBA wrote:
> On 14/02/2012 17:23, AJ Weber wrote:
>> Right.  How do I determine if the text in the /Contents stream is the
>> intended contents of the page, or whether someone added it
>> after-the-fact?  Ugh.  Users...
> It depends on how the text was added.
>
> For instance: if they used PdfStamper, there will be different content
> streams in an array.
> Maybe the content you want to remove is in one array, which you could
> remove.
>
> Or maybe it was added as an XObject.
> In that case, blanking out the content of that XObject would solve your
> problem.
>
> Or maybe it's really inside the main content stream.
> In that case, you need to write a PDF syntax parser (I've written
> several in the past) using PRTokeniser.
> Let the parser copy all the PDF syntax except for the Text Operators
> (and its operands) that draw the text you want to remove.
>
> Have fun!
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> 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

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
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

Reply via email to