public final class CGPDFAccessPermissions
extends java.lang.Object
Some PDF access permissions are non-strict supersets of other permissions. Granting access to a superset permission also grants access to permission(s) it is a superset of. These permissions are as follows:
* Granting kCGPDFAllowsHighQualityPrinting also grants kCGPDFAllowsLowQualityPrinting * Granting kCGPDFAllowsDocumentChanges also grants kCGPDFAllowsCommenting and kCGPDFAllowsFormFieldEntry * Granting kCGPDFAllowsContentCopying also grants kCGPDFAllowsContentAccessibility * Granting kCGPDFAllowsCommenting also grants kCGPDFAllowsFormFieldEntry
These relationships don't come from the PDF spec. There is nothing in the spec that says you always get low-quality printing if you've already got high-quality printing. They are just two different bits with no explicit dependencies. However, in practice, the software that most people use to edit PDF permissions only allows creation of PDFs that follow these conventions.
In the interest of consistency with how these bits are used in practice, kCGPDFContextAccessPermissions enforces the superset model of PDF permissions. For example, if you try to grant high-quality printing but not low-quality printing, the low-quality bit will get turned on anyway. This does not apply to how permissions are read, however. It's very likely that there exist PDFs that don't follow these conventions. For that reason, when checking permissions, always check for the narrowest one that applies. For example, if you're interested in form field entry, always test for kCGPDFAllowsFormFieldEntry specifically. You can't assume that you have it just because you also have kCGPDFAllowsCommenting or kCGPDFAllowsDocumentChanges.
| Modifier and Type | Field and Description |
|---|---|
static int |
Commenting
Create or modify annotations, including form field entries
|
static int |
ContentAccessibility
Extract content, but only for the purpose of accessibility
|
static int |
ContentCopying
Extract content (text, images, etc.)
|
static int |
DocumentAssembly
Page management: insert, delete, and rotate pages
|
static int |
DocumentChanges
Modify the document contents except for page management
|
static int |
FormFieldEntry
Modify form field entries
|
static int |
HighQualityPrinting
Print at any DPI
|
static int |
LowQualityPrinting
Print at up to 150 DPI
|
public static final int LowQualityPrinting
public static final int HighQualityPrinting
public static final int DocumentChanges
public static final int DocumentAssembly
public static final int ContentCopying
public static final int ContentAccessibility
public static final int Commenting
public static final int FormFieldEntry