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

DynaPDF Manual - Page 674

Previous Page 673   Index   Next Page 675

Function Reference
Page 674 of 750
LBOOL pdfSetLeading(
const PPDF* IPDF,
// Instance pointer
double Value)
// New leading or 0
The function sets the leading (also called line spacing) that is used by the functions
AddContinueText() and WriteFText() to calculate the distance between two text lines. The default
leading in PDF is the font size. A value of 0 determines that the font size should be used as leading,
this is the default behaviour.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
LBOOL pdfSetLicenseKey(
const PPDF* IPDF,
// Instance pointer
const char* Value) // License key as string
The function sets the license key and deactivates the demo mode if the key was valid. If the value
represents a correct license key the demo string does not longer appear on PDF pages. Once a correct
key was set, it will be active until the library will be unloaded or the current PDF instance is deleted.
Note that the key must be set for each PDF instance or process of a multi-threading application.
To determine whether a specific function is available in DynaPDF Starter or Lite, pass the string
"Starter" or "Lite" to the function; all functions which are disabled in these versions produce then an
error. It is a good idea to set an error callback function so that you can see all errors…
Notice: The license key must not be stored in the registry or other files in an unencrypted form.
Return values:
The function returns true whether or not the key was valid!
If the key is valid but expired, then the return value is false.
The recommended way to apply the license key is as follows:
// Check first whether the right version of the dynapdf.dll was loaded and
// set then the license key.
// Maybe you check also the minor version if you need features which are
// not available in an older version...
char* ver = pdfGetDynaPDFVersion();
if (ver[0] < '3' || pdfSetLicenseKey(pdf, "...") == false)
throw("Wrong dynapdf.dll version loaded!");

Previous topic: Language Identifiers

Next topic: SetLineAnnotParms