DynaPDF Manual - Page 507

Previous Page 506   Index   Next Page 508

Function Reference
Page 507 of 839
SI32 pdfGetUserRights(
const PPDF* IPDF) // Instance pointer
typedef SI32 TRestrictions;
#define rsDenyNothing
0x00000000 // Editing is not restricted
#define rsDenyAll
0x00000F3C // Deny anything
#define rsPrint
0x00000004 // Deny printing
#define rsModify
0x00000008 // Deny modification of contents
#define rsCopyObj
0x00000010 // Deny copying of contents
#define rsAddObj
0x00000020 // No commenting
/* 128/256 bit only -> not meaningful with 40 bit encryption */
#define rsFillInFormFields 0x00000100 // requires rsModify + rsAddObj
#define rsExtractObj
0x00000200 // Extract text, images, vector data
#define rsAssemble
0x00000400 // Text access for screen readers
#define rsPrintHighRes
0x00000800 // Disable high res. printing
#define rsExlMetadata
0x00001000 // Metadata streams are unencrypted?
#define rsEmbFilesOnly
0x00002000 // If set, rsExlMetadata is set too
The function returns the encryption flags of the last imported PDF file or -1 if the file was not
encrypted. These flags must be considered when opening an encrypted PDF with user privileges,
that is, when the open password was used to decrypt the file. The print flags rsPrint and
rsPrintHighRes can be ignored for editing, but the file must be encrypted again with the same
encryption flags.
The encryption flags are described in detail at CloseFileEx(). If no file was imported beforehand the
return value is zero. Use GetInIsEncrypted() to determine whether the file was encrypted.
float pdfGetUserUnit(
const PPDF* IPDF) // Instance pointer
The function returns the user unit of the current open page. A user unit acts like a scaling factor. The
page format and all page coordinates are multiplied with this factor in a viewer application. The
default size of a PDF unit is 1/72 inch and the default user unit is 1.0. User units can be useful if the
page format would be too large to be expressed in standard PDF units. The largest page format in
PDF is limited to 14400 units or 200 inches. This limit can be extended with the user unit.
The largest value that is supported is 75.0 which results in a maximum page format of 15,000 x
15,000 inches or 1,800,000 units.

Previous topic: GetUseExactPwd, GetUseGlobalImpFiles

Next topic: GetUseStdFonts, GetUseSystemFonts