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

Free Support Forum - aspose.com

PdfFileSecurity destroys links

Hi,

PdfFileSecurity seems to have a bug similar to the one found in PdfFileInfo*. If I use the following code on our test document (see attachment for details), all links after page 12 are corrupt.

String inFile = "docobfuscated.pdf";
String outFile = "docobfuscated.out.pdf";
PdfFileSecurity fileSecurity = new PdfFileSecurity(inFile, outFile);
int priv=0;
priv|=PdfPrivilege.Copy;
priv|=PdfPrivilege.ScreenReaders;
priv|=PdfPrivilege.DegradedPrinting;
priv|=PdfPrivilege.Print;
fileSecurity.encryptFile(null, "testpassword", priv, true);

Could you please check this and provide a fix?

Regards,
Mathias

*: <A href="https://forum.aspose.com/t/102843</A></P>

Hi Mathias,

I have reproduced this problem at my end and logged it as PDFKITJAVA-32401 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,