We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Re: Replace text in PDF

Any News from Replace text feature? I downloaded the latest version of Aspose and it’s not working.

Thanks,

Hi,

I have contacted our development team for the updates on this issue. We'll let you know of any updates as we get some information.

We appreciate your patience.

Regards,

Hi,

We have enhanced the feature of replacing text in our Java edition but not yet for the .NET edition. What edition of Aspose.Pdf.Kit are you using? .NET or Java? And could you please attach the PDF file here to help us to improve the feature?

Thanks,

Hi,

We are using the latest version of Aspose.pdf.kit of .net version. Attached is PDF file we have tried.
Please try to replace any word doesn’t meter which one. Also please provide other workaround if it is.

Thanks,

Vasil Mamikonyan

Hi,

I find that the attached pdf has been secured, and you need to decrypt it before replacing any words with others. Please try the following code.

PdfFileSecurity filesec = new PdfFileSecurity(@"D:\Expression_of_interest_form_1100.pdf",@"D:\unSecFile.pdf");
filesec.DecryptFile(
"");

PdfContentEditor contentEditor
= new PdfContentEditor();
contentEditor.BindPdf(
@"D:\unSecFile.pdf");
contentEditor.ReplaceText(
"Expression","EEEEEEEEEE");
contentEditor.Save(
@"D:\replaceText.pdf");

For more information about how to encrypt&decrypt PDF files, please refer to Implementing Security.

Thanks,