VpeSetProtection

<< Click to Display Table of Contents >>

Navigation:  PDF Export >

VpeSetProtection

Previous pageReturn to chapter overviewNext page

[VPE Professional Edition and above]

Sets the document protection flags. Document protection is only in effect, if encryption (see VpeSetEncryption()) is activated.

void VpeSetProtection(

VpeHandle hDoc,

long protection_flags

)

VpeHandle hDoc

Document Handle

long protection_flags

possible values are:

Constant Name

Value

Comment

PDF_ALLOW_NONE

0

full protection, no flag is raised

PDF_ALLOW_PRINT

4

allow to print the document (see also the flag PDF_ALLOW_HIQ_PRINT)

PDF_ALLOW_MODIFY

8

allow to modify the contents of the document by operations other than those controlled by the flags PDF_ALLOW_TA_IFF, PDF_ALLOW_FILL_IFF and PDF_ALLOW_ASSEMBLE

PDF_ALLOW_COPY

16

PDF v1.3: allow to copy or otherwise extract text and graphics from the document, including extracting text and graphics (in support of accessibility to disabled users or for other purposes)

PDF v1.4: allow to copy or otherwise extract text and graphics from thedocument by operations other than that controlled by PDF_ALLOW_EXTRACT

PDF_ALLOW_TA_IFF

32

allow to add or modify text annotations, fill in interactive form fields, and - if PDF_ALLOW_MODIFY is also used - create or modify interactive form fields (including signature fields)

PDF_ALLOW_FILL_IFF

256

PDF v1.4 only: allow to fill in existing interactive form fields (including signature fields), even if PDF_ALLOW_TA_IFF is not used

PDF_ALLOW_EXTRACT

512

PDF v1.4 only: allow to extract text and graphics (in support of accessibility to disabled users or for other purposes)

PDF_ALLOW_ASSEMBLE

1024

PDF v1.4 only: allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if PDF_ALLOW_MODIFY is not used

PDF_ALLOW_HIQ_PRINT

2048

PDF v1.4 only: allow to print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this flag is NOT specified (and PDF_ALLOW_PRINT is used), printing is limited to a lowlevel representation of the appearance, possibly of degraded quality.

Acrobat viewers implement this limited mode of printing as “Print As Image”, except on UNIX systems, where this feature is not available.

PDF_ALLOW_ALL

3900

no protection, all flags are raised

Default:

PDF_ALLOW_NONE