Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Aug 09, 2023 7:43 pm

We have an earlier version of Spire.pdf in our product, one of the tasks performed is redaction.

Does version 9 have the ability to remove the text from the text later of the redacted area?

Many thanks in advance,

Darren.

wraydc
 
Posts: 130
Joined: Wed Apr 11, 2018 5:14 am

Thu Aug 10, 2023 3:28 am

Hello,

Thank you for your inquiry.
If you want to remove the content of the redacted area in the PDF file, you can use the following two methods to replace the text to be removed with empty text:
Code: Select all
// Get the first page of pdf file
PdfPageBase page = doc.Pages[0];
//Create a PdfTextReplacer using the first page
PdfTextReplacer replacer = new PdfTextReplacer(page);
//Replace all texts in this page
replacer.ReplaceAllText("text","");
//Replace the first found word
replacer.ReplaceText("text", "");

If this is not the effect you want, to help us investigate further, please provide us with your sample PDF file and the the effect of the result file you want. You could attach them here or send them to us via email ([email protected]). Thanks in advance.

Sincerely,
Wenly
E-iceblue support team
User avatar

Wenly.Zhang
 
Posts: 149
Joined: Tue May 16, 2023 2:19 am

Return to Spire.PDF