Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 465

Previous Page 464   Index   Next Page 466

Function Reference
Page 465 of 750
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.
ImportPage
Syntax:
SI32 pdfImportPage(
const PPDF* IPDF, // Instance pointer
UI32 PageNum)
// Page number
The function imports a page from an external PDF file and converts it to a template. The external
PDF file must be opened with OpenImportFile() or OpenImportBuffer() beforehand. The parameter
PageNum specifies the page number that should be imported; the first page has the number 1.
The conversion of pages to templates is required if an imported page should be scaled or placed on a
specific position or if an imported page should be used on more than one destination page, e.g. as a
custom page background.
However, in cases where the conversion of pages to templates is not necessary the usage of
ImportPageEx() within an open page is preferred. In this case it is also possible to import interactive
objects with the page such as annotations or form fields. Such objects cannot be imported with
ImportPage() because templates do not support interactive objects.
 

Previous topic: ImportDocInfo

Next topic: Bounding boxes