DynaPDF Manual - Page 607

Previous Page 606   Index   Next Page 608

Function Reference
Page 607 of 883
LoadLayerConfig
Syntax:
LBOOL pdfLoadLayerConfig(
const PPDF* IPDF, // Instance pointer
SI32 Index)
// See description
The function loads the specified layer configuration. A PDF file that contains layers (Optional
Content Groups in PDF syntax) contains usually at least a default configuration dictionary. This
configuration is loaded by default when the visibility state of a layer or optional content group must
be determined, e.g. when rendering a page.
Use this function to load another configuration if available. To determine the number of available
configurations call GetLayerConfigCount().
The parameter Index can be one of the following:
-1: Load the default configuration.
-2: If a configuration was already loaded, leave it unchanged. Load
the default configuration otherwise.
0..Count -1: Load the specified configuration.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
LoadSVG
Syntax:
ISVG* pdfLoadSVG(
const PPDF* IPDF,
// Instance pointer
const char* FileName) // Path of the SVG file
The function opens the specified SVG file and returns the SVG parser instance on success.
Notice:
The caller is responsible to delete the parser instance when finish with DeleteSVG(). This pointer
is not maintained by DynaPDF. That means if you forget to delete the parser instance a memory
leak will occur.
The PHP extension is an exception in this regard. The PHP extension makes sure that the
instance will be deleted when it becomes out of scope.
Note also that the SVG parser instance contains a reference of the PDF instance and this instance
pointer cannot be changed at runtime. The PDF instance is used to output errors and warning to
the error log.
 

Previous topic: Header / footer types, Loading header / footer or bates number settings, How to check whether a file contains headers or footers?

Next topic: LoadSVGFromBuffer