Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iText - remove previously inserted over content text - Help Needed

 
Mick Smith
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I could really do with some urgent help on this. Searching the Web to get a good example on this issue is very scarce.

Basically my requirement is that I stamp existing PDF documents with certain text and save it. This I have working fine(& Lots of examples on the Web). However, if later on I want to remove the text that I added to the PDF, I am having problems with. There is very little information on how this is done - Its like a BIG SECRET!!

To add my text as an over stamp, I do something like this which works fine:



REMOVING The Text...

I found someting which indicated that removing the added text requires a lot more work. Whereby, a program would need to read the individual pages resources & remove XOBJECT's. So I have this peice of code:




Apparently the calling of is supposed to remove the XOBJECT elements in that page of the PDF & thus remove the over context text that exists in the PDF. However, When I run this code, nothing gets removed. Infact, when debugging I dont see any XOBJECTs at all!

Appreciate any expert help in this matter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic