I'm looking for a solution to remove/delete ALL text from a pdf. I've been using iTextSharp for a while now, and extracting text from a pdf with it is easy (wihouth the use of OCR). However I can't find an option to delete the text.
This solution frankly doesn't work for me.
/Contentsof a page dictionary doesn't always consist of an array. It should be evident that
nullif the content is stored as a stream.
GetAsStream()and you remove all the text contents from the stream, then you may still have text content in XObjects. That text won't be referenced from a content stream, but iText won't be able to remove the XObjects as 'unused objects' because the objects will still be referenced from the
/Resourcesin the page dictionary.
Please read ISO-32000-1 to find out what you're doing wrong.