Any pdfs that we apply encryption to show up blank when opening pdf with the app Preview on the mac operating system. If the pdf has a link then the page is blank with a box where the link is located. Has anyone experienced this issue, we have been able to produce the problem using 2 differant mac machines.
Here is the code we are using to encrypt the pdf:
PdfFileSecurity fileSecurity = new PdfFileSecurity(inputDocument, outputDocument);
// Setup the security object based on options
DocumentPrivilege documentPrivileges = DocumentPrivilege.ForbidAll;
documentPrivileges.AllowCopy = options.AllowCopy;
documentPrivileges.AllowPrint = options.AllowPrint;
documentPrivileges.AllowScreenReaders = true;
fileSecurity.EncryptFile(options.UserPassword, options.OwnerPassword, documentPrivileges, KeySize.x256);
If we don’t encrypt the pdf the file opens without issues, and this is only happening on a Mac when using Preview. All other OS and pdf readers opens the file without any issues.
Thanks.