PDF Library Session Functions

Starts, configures, and terminates a session with the PDF Library. More...

Functions

A3DStatus A3DPDFCheckPDFLibInitialization (A3DBool *pbIsInitialized)
 Function to check if the PDF Library has been initialized with A3DPDFInitializePDFLibAndResourceDirectory. More...
 
A3DStatus A3DPDFInitializePDFLib ()
 
A3DStatus A3DPDFInitializePDFLibAndResourceDirectory (const A3DUTF8Char *pcResourceDirectory)
 Function to initialize the PDF Library and set the resource directory. More...
 
A3DStatus A3DPDFTerminatePDFLib ()
 Function to terminate the PDF Library. Terminates the PDF library. This function should only be called at the end of your application. Do not call this function and then continue to use either HOOPS Exchange or HOOPS Publish. Doing so will result in undefined behavior. It is important to call this function only once during the life of the application. More...
 

Detailed Description

Starts, configures, and terminates a session with the PDF Library.

The functions in this section start and terminate a session with the PDF Library. WARNING: the initialization and termination functions must be called only once during the life of the application. Attempting to initialize the PDF Library more than once in the application may cause errors or unpredictable behavior, and is not supported. You are free to create multiple documents and/or multiple files within the run, but the initialization and termination of the PDF Library is limited to one iteration of each.

Function Documentation

◆ A3DPDFInitializePDFLib()

A3DStatus A3DPDFInitializePDFLib ( )
Deprecated:
This method was deprecated in HOOPS Publish 5.1. Use A3DPDFInitializePDFLibAndResourceDirectory instead.

This function initializes the Adobe PDF Library which is internally used by HOOPS Publish. It should be called before calling any function working on the PDF document, and only once during the life of the application.

Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
4.1

◆ A3DPDFInitializePDFLibAndResourceDirectory()

A3DStatus A3DPDFInitializePDFLibAndResourceDirectory ( const A3DUTF8Char pcResourceDirectory)

Function to initialize the PDF Library and set the resource directory.

This function initializes the Adobe PDF Library which is internally used by HOOPS Publish, and indicates where the resource directory is located. The resource directory is used by the Adobe PDF Library to manipulate text data. Customers should consider as a general rule that a complete resource directory (subfolders included) should always exist in the distribution and should always be specified to the A3DPDFInitializePDFLibAndResourceDirectory function. Not providing a valid resource directory can lead to unexpected behavior and crashes. As an example, the Table functionality fails if the resource directory doesn't exist or is not specified. A minimal exception to this rule might be when the PDF document generated doesn't contain any text strings, whatever the source (added with HOOPS Publish functions or even already defined in a provided PDF template).

The resource directory is provided with the HOOPS Publish package in the \bin\resource folder. Please also consider all subfolders as part of the resources.

This function should be called before calling any function working on the PDF document, and only once during the life of the application.

Parameters
[in]pcResourceDirectoryThe path of an existing directory with full resource definition as provided in the HOOPS Publish package. The path must be absolute, or must be relative to the location of your binary files. If relative, please make it start by a '.' or ".." character. Empty string ("") is valid but should be used very cautiously as not using resources can lead to unexpected behavior and crashes (see function description).
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
5.0

◆ A3DPDFTerminatePDFLib()

A3DStatus A3DPDFTerminatePDFLib ( )

Function to terminate the PDF Library. Terminates the PDF library. This function should only be called at the end of your application. Do not call this function and then continue to use either HOOPS Exchange or HOOPS Publish. Doing so will result in undefined behavior. It is important to call this function only once during the life of the application.

Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
4.1

◆ A3DPDFCheckPDFLibInitialization()

A3DStatus A3DPDFCheckPDFLibInitialization ( A3DBool pbIsInitialized)

Function to check if the PDF Library has been initialized with A3DPDFInitializePDFLibAndResourceDirectory.

Parameters
[out]pbIsInitializedtrue if the PDF Library has been initialized, false if not.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
11.0