DynaPDF Manual - Page 450

Previous Page 449   Index   Next Page 451

Function Reference
Page 450 of 860
GetInEncryptionFlags (obsolete)
Syntax:
SI32 pdfGetInEncryptionFlags(
const PPDF* IPDF) // Instance pointer
The function returns the encryption flags of the currently opened import file. If no flag is set the
return value is zero. To determine whether a PDF file is encrypted call the function
GetInIsEncrypted().
This function is marked as obsolete. Please call GetInEncryptionInfo() instead.
GetInEncryptionInfo
Syntax:
LBOOL pdfGetInEncryptionInfo(
const PPDF* IPDF,
// Instance pointer
struct TPDFEncryptInfo* Info) // Required
struct TPDFEncryptInfo
{
UI32
StructSize;
// Must be set to sizeof(TPDFEncryptInfo)
TKeyLen
Filter;
// Encryption filter
LBOOL
HaveOpenPassword;
// If true, an open password was set.
LBOOL
HaveOwnerPassword; // If true, an owner password was set.
TRestrictions Restrictions;
// What must be restricted? This is a bit mask and the very same
// value that GetInEncryptionFlags() returns.
LBOOL
UnsafeOpenPwd;
// If true, the file can be easily decrypted by DynaPDF if
// SetUseExactPwd() is false.
LBOOL
UnsafeOwnerPwd;
// If true, the file can be easily decrypted by DynaPDF if
// SetUseExactPwd() is false.
};
The function retrieves encryption settings of the currently active import file, see OpenImportFile()
for further information. It is not meaningful to call this function on an unencrypted file. Therefore,
call GetInIsEncrypted() beforehand to determine whether the file is encrypted.
The member Restrictions must be handled differently depending on the key length of the encryption
filter.
Adobe’s Acrobat shows a document restrictions summary in the document properties dialog:
Property
Possible values
Variable name in example algorithm
Printing
Allowed, Not Allowed, Low Resolution
lbPrinting
Changing the Document
Allowed, Not Allowed
lbChangeDoc
Document assembly
Allowed, Not Allowed
lbDocAssembly
Content Copying
Allowed, Not Allowed
lbCopyCont
Content Copying for Accessibility
Allowed, Not Allowed
lbCopyContAcc
Page Extraction
Allowed, Not Allowed
lbPageExtraction
Commenting
Allowed, Not Allowed
lbCommenting
Filling of Form Fields
Allowed, Not Allowed
lbFillFormFields
Signing
Allowed, Not Allowed
lbSigning
Creation of Template Pages
Allowed, Not Allowed
lbTemplCreation
 

Previous topic: GetInDocInfoCount, GetInDocInfoEx

Next topic: GetInFieldCount