XCode 10.3, macOS 10.14
*I don't check it on iOS.
We can get security permissions of PDF by following properties of PDFDocument instance. But It's not correct permissions on some cases.
- If PDF has printing permission (both of high or low resolution are ok),
YESregardless of the PDF has copying permission.
- If PDF has copying permission,
YESregardless of the PDF has printing permission.
*It seems the preview of macOS use these permission values. So we can print a PDF if it has copying permission even there is no printing permission. And we can copy the contents of a PDF if it has printing permission even there is no copying permission.
Can we get correct permissions from PDFDocument instance?
We can use
PDFDocument.documentRef. These functions return correct PDF permissions.