Free Support Forum - aspose.com

How to secure my pdf to unsearchable content?


Dear Support,

How to secure my pdf to unsearchable content?

I ran codes below, but the content of my pdf still searchable

pdfDocument.Encrypt("","", 0, CryptoAlgorithm.RC4x128);

please help

Thanks

-

-

Hi,


Thanks for using our products.

Once the PDF file is encrypted using Aspose.Pdf for .NET, you need to provide the password to decrypt the PDF document when viewing the PDF file. Once the file is decrypted, the contents are displayed as they were originally present in PDF file. From your above requirement, do you need to prevent the searching of contents inside PDF document ? if so is the case, then I am afraid this feature is currently not supported.

However as a workaround, you may first convert the pages of PDF file into Image format and then again create a PDF file using those images. We are sorry for this inconvenience.