Xojo Conferences
MBSOct2019CologneDE
XDCMarch2020NashvilleUS

DynaPDF Manual - Page 477

Previous Page 476   Index   Next Page 478

Function Reference
Page 477 of 770
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ImportEncryptionSettings
Syntax:
LBOOL pdfImportEncryptionSettings(
const PPDF* IPDF) // Instance pointer
The function imports the encryption settings from the currently open import file (see
OpenImportFile() or OpenImportBuffer() for further information).
If the PDF file is not encrypted, the function does nothing. To determine whether the open PDF file is
encrypted call GetInIsEncrypted().
The encryption settings should be imported to make sure that the PDF file can be saved with the
same settings after it was edited. The user rights should be considered if the file was opened with the
open password, also if the password was just an empty string. See GetUserRights() for further
information.
If the file was opened with the owner password, then all editing rights should be grated.
The PDF file must be closed with CloseFile() or CloseAndSignFile() for example. Don't use
CloseFileEx() for example since this function would override the encryption settings.
If the file should be saved unencrypted call ResetEncryptionSettings() before closing the file.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ImportOCProperties
Syntax:
LBOOL pdfImportOCProperties(
const PPDF* IPDF) // Instance pointer
The function imports the global Optional Content Properties of the curent open import file (see
OpenImportFile() fur further information).
OC properties are normally automatically imported by functions like ImportPDFFile() or when
importing a page that contains layers. However, a viewer application must be able to access the OC
properties right after the PDF file was opened so that the layer configuration and the layer tree can
be loaded (see LoadLayerConfig() and GetOCUINode() for further information).
The function can be called multiple times without causing unwanted side effects.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: ImportBookmarks, ImportCatalogObjects, ImportDocInfo

Next topic: ImportPage, Bounding boxes