Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Document protection and encryption
Collapse All

This method sets the raw PDF document's user access permissions as a 32-bit unsigned integer value.

Syntax

HRESULT SetSecurityFlagsRaw (
LONG flags
)
Parameters
flags
Security bits of the raw PDF document

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

User access permissions:

Bit position

Meaning

1-2 Reserved; must be 0.
3 (Revision 2) Print the document.
(Revision 3 or greater) Print the document (possibly not at the highest
quality level, depending on whether bit 12 is also set).
4 Modify the contents of the document by operations other than those controlled by bits 6, 9, and 11.
5 (Revision 2) Copy or otherwise extract text and graphics from the document, including extracting text and graphics (in support of accessibility
to users with disabilities or for other purposes).
(Revision 3 or greater) Copy or otherwise extract text and graphics from the document by operations other than that controlled by bit 10.
6 Add or modify text annotations, fill in interactive form fields, and, if bit 4 is also set, create or modify interactive form fields (including signature fields).
7-8 Reserved; must be 1.
9 (Revision 3 or greater) Fill in existing interactive form fields (including
signature fields), even if bit 6 is clear.
10 (Revision 3 or greater) Extract text and graphics (in support of accessibility
to users with disabilities or for other purposes).
11 (Revision 3 or greater) Assemble the document (insert, rotate, or delete
pages and create bookmarks or thumbnail images), even if bit 4 is clear.
12 (Revision 3 or greater) Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this bit is clear (and bit 3 is set), printing is limited to a low-level representation of the appearance, possibly of degraded quality.
13-32 (Revision 3 or greater) Reserved; must be 1.

Note: Revision 2 means el40bitRC4 is used as the DocumentEncryption's value. Revision 3 means el128bitRC4 is used.

For example:

  • Setting value FFFFF4C0 (hex) is identical to setting the AllowChangeDocument property to the AllowedChangesAllowLevel1Changes value.
  • Setting value FFFFF1E8 (hex) is identical to setting the AllowChangeDocument property to the AllowedChanges AllowLevel4Changes value.
  • Setting value FFFFFFFC (hex) allows all.
  • Setting FFFFF0C0 (hex) dissallows all.

See the UserPassword property for examples.

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots