PDF Toolbox
Loading...
Searching...
No Matches
Macros | Functions
PdfTools_Toolbox_Ptx.h File Reference
#include "PdfTools_Toolbox_Types.h"
#include "PdfTools_Toolbox_PtxSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLS_TOOLBOX_CALL
 
#define Ptx_GetLastErrorMessage   Ptx_GetLastErrorMessageA
 
#define Ptx_Sdk_Initialize   Ptx_Sdk_InitializeA
 
#define Ptx_Sdk_AddFontDirectory   Ptx_Sdk_AddFontDirectoryA
 
#define Ptx_Sdk_GetVersion   Ptx_Sdk_GetVersionA
 
#define Ptx_Sdk_GetProducerFullName   Ptx_Sdk_GetProducerFullNameA
 
#define Ptx_Sdk_GetLicensingService   Ptx_Sdk_GetLicensingServiceA
 
#define Ptx_Sdk_SetLicensingService   Ptx_Sdk_SetLicensingServiceA
 
#define Ptx_StringMap_Get   Ptx_StringMap_GetA
 
#define Ptx_StringMap_GetKey   Ptx_StringMap_GetKeyA
 
#define Ptx_StringMap_GetValue   Ptx_StringMap_GetValueA
 
#define Ptx_StringMap_Set   Ptx_StringMap_SetA
 
#define Ptx_StringMap_SetValue   Ptx_StringMap_SetValueA
 

Functions

PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_Initialize ()
 Initializes the library.
 
PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_Uninitialize ()
 Uninitializes the library.
 
PDFTOOLS_TOOLBOX_EXPORT TPtx_ErrorCode PDFTOOLS_TOOLBOX_CALL Ptx_GetLastError ()
 Retrieves the last error code.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_GetLastErrorMessageA (char *pBuffer, size_t nBufferSize)
 Retrieves the last error message.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_GetLastErrorMessageW (WCHAR *pBuffer, size_t nBufferSize)
 Retrieve last error message.
 
PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_SetLastErrorA (TPtx_ErrorCode iErrorCode, const char *szErrorMessage)
 Set last error code and error message.
 
PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_SetLastErrorW (TPtx_ErrorCode iErrorCode, const WCHAR *szErrorMessage)
 Set last error code and error message.
 
PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_Release (void *pObject)
 Release object.
 
PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_AddRef (void *pObject)
 Increase reference count of object.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Equals (void *pObject, void *pOther)
 Compare two native objects.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_GetHashCode (void *pObject)
 Get a hash code.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_InitializeA (const char *szLicense, const char *szProducerSuffix)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_InitializeW (const WCHAR *szLicense, const WCHAR *szProducerSuffix)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_AddFontDirectoryA (const char *szDirectory)
 Add custom font directory.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_AddFontDirectoryW (const WCHAR *szDirectory)
 Add custom font directory.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetVersionA (char *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetVersionW (WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA (char *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetProducerFullNameW (WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetLicensingServiceA (char *pBuffer, size_t nBufferSize)
 Licensing service to use for all licensing requests.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetLicensingServiceW (WCHAR *pBuffer, size_t nBufferSize)
 Licensing service to use for all licensing requests.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_SetLicensingServiceA (const char *szLicensingService)
 Licensing service to use for all licensing requests.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_SetLicensingServiceW (const WCHAR *szLicensingService)
 Licensing service to use for all licensing requests.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetCount (TPtx_StringMap *pStringMap)
 The number of key-value pairs in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetSize (TPtx_StringMap *pStringMap)
 The number of key-value pairs in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetBegin (TPtx_StringMap *pStringMap)
 Get the position of the first entry in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetEnd (TPtx_StringMap *pStringMap)
 Get the end position of the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetNext (TPtx_StringMap *pStringMap, int it)
 Get the position of the next entry in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetA (TPtx_StringMap *pStringMap, const char *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetW (TPtx_StringMap *pStringMap, const WCHAR *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetKeyA (TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetKeyW (TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetValueA (TPtx_StringMap *pStringMap, int it, char *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetValueW (TPtx_StringMap *pStringMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetA (TPtx_StringMap *pStringMap, const char *szKey, const char *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetW (TPtx_StringMap *pStringMap, const WCHAR *szKey, const WCHAR *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetValueA (TPtx_StringMap *pStringMap, int it, const char *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetValueW (TPtx_StringMap *pStringMap, int it, const WCHAR *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_Clear (TPtx_StringMap *pStringMap)
 Remove all entries from the map.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_Remove (TPtx_StringMap *pStringMap, int it)
 Remove the entry at a position in the map.
 

Macro Definition Documentation

◆ PDFTOOLS_TOOLBOX_CALL

#define PDFTOOLS_TOOLBOX_CALL

◆ Ptx_GetLastErrorMessage

#define Ptx_GetLastErrorMessage   Ptx_GetLastErrorMessageA

◆ Ptx_Sdk_AddFontDirectory

#define Ptx_Sdk_AddFontDirectory   Ptx_Sdk_AddFontDirectoryA

◆ Ptx_Sdk_GetLicensingService

#define Ptx_Sdk_GetLicensingService   Ptx_Sdk_GetLicensingServiceA

◆ Ptx_Sdk_GetProducerFullName

#define Ptx_Sdk_GetProducerFullName   Ptx_Sdk_GetProducerFullNameA

◆ Ptx_Sdk_GetVersion

#define Ptx_Sdk_GetVersion   Ptx_Sdk_GetVersionA

◆ Ptx_Sdk_Initialize

#define Ptx_Sdk_Initialize   Ptx_Sdk_InitializeA

◆ Ptx_Sdk_SetLicensingService

#define Ptx_Sdk_SetLicensingService   Ptx_Sdk_SetLicensingServiceA

◆ Ptx_StringMap_Get

#define Ptx_StringMap_Get   Ptx_StringMap_GetA

◆ Ptx_StringMap_GetKey

#define Ptx_StringMap_GetKey   Ptx_StringMap_GetKeyA

◆ Ptx_StringMap_GetValue

#define Ptx_StringMap_GetValue   Ptx_StringMap_GetValueA

◆ Ptx_StringMap_Set

#define Ptx_StringMap_Set   Ptx_StringMap_SetA

◆ Ptx_StringMap_SetValue

#define Ptx_StringMap_SetValue   Ptx_StringMap_SetValueA

Function Documentation

◆ Ptx_AddRef()

PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_AddRef ( void * pObject)

Increase reference count of object.

Internally, the reference count is incremented by 1.

Parameters
[in,out]pObjectObject which reference count should be incremented by 1.

◆ Ptx_Equals()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Equals ( void * pObject,
void * pOther )

Compare two native objects.

Checks if two handles point to the same object.

Parameters
[in]pObjectPointer to one object.
[in]pOtherPointer to other object.
Returns
TRUE if both pointers point to the same object; FALSE otherwise.

◆ Ptx_GetHashCode()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_GetHashCode ( void * pObject)

Get a hash code.

Get a hash code for a given native object.

Parameters
[in]pObjectPointer to the object for which a hash code is calculated.
Returns
The hash code of the object.

◆ Ptx_GetLastError()

Retrieves the last error code.

When a function returns a value indicating a potential error, determine the error by a specific error code. An error is confirmed if the error code differs from ePtx_Error_Success.

Returns
The error code that last was set.

◆ Ptx_GetLastErrorMessageA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_GetLastErrorMessageA ( char * pBuffer,
size_t nBufferSize )

Retrieves the last error message.

Gets a detailed error message.

Parameters
[out]pBufferThe function has to be called twice, the first time by setting pBuffer to NULL to obtain the actual buffer size and the second time with the allocated pBuffer and the buffer size obtained in the first call. The return value of this function specifies the buffer size.
[in]nBufferSizeThe number of characters to be copied to pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.

◆ Ptx_GetLastErrorMessageW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_GetLastErrorMessageW ( WCHAR * pBuffer,
size_t nBufferSize )

Retrieve last error message.

Gets a detailed error message.

Parameters
[out]pBufferThe function has to be called twice, the first time by setting pBuffer to NULL to obtain the actual buffer size and the second time with the allocated pBuffer and the buffer size obtained in the first call. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.

◆ Ptx_Initialize()

Initializes the library.

The function that must be called before any other API function. Failing to invoke this function results in undefined behavior.

◆ Ptx_Release()

PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_Release ( void * pObject)

Release object.

Register errors by calling this function within a callback body. Disposable objects should be properly disposed by using their respective close functions.

Parameters
[in]pObjectObject to be released.

◆ Ptx_Sdk_AddFontDirectoryA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_AddFontDirectoryA ( const char * szDirectory)

Add custom font directory.

Parameters
[in]szDirectoryThe path of the directory which contains additional font files to be considered during processing.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_AddFontDirectoryW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_AddFontDirectoryW ( const WCHAR * szDirectory)

Add custom font directory.

Parameters
[in]szDirectoryThe path of the directory which contains additional font files to be considered during processing.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_GetLicensingServiceA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetLicensingServiceA ( char * pBuffer,
size_t nBufferSize )

Licensing service to use for all licensing requests.

This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

Where:

  • http/https: Protocol for connection to the Licensing Gateway Service.
  • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
  • ‹host›: Hostname of the Licensing Gateway Service.
  • ‹port›: Port for connection to the Licensing Gateway Service.

Example: "http://localhost:9999"

Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_GetLicensingServiceW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetLicensingServiceW ( WCHAR * pBuffer,
size_t nBufferSize )

Licensing service to use for all licensing requests.

This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

Where:

  • http/https: Protocol for connection to the Licensing Gateway Service.
  • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
  • ‹host›: Hostname of the Licensing Gateway Service.
  • ‹port›: Port for connection to the Licensing Gateway Service.

Example: "http://localhost:9999"

Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_GetProducerFullNameA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetProducerFullNameA ( char * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetProducerFullNameW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetProducerFullNameW ( WCHAR * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetVersionA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetVersionA ( char * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_GetVersionW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_GetVersionW ( WCHAR * pBuffer,
size_t nBufferSize )
Parameters
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ Ptx_Sdk_InitializeA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_InitializeA ( const char * szLicense,
const char * szProducerSuffix )
Parameters
[in]szLicense
[in]szProducerSuffix
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_InitializeW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_InitializeW ( const WCHAR * szLicense,
const WCHAR * szProducerSuffix )
Parameters
[in]szLicense
[in]szProducerSuffix
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_SetLicensingServiceA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_SetLicensingServiceA ( const char * szLicensingService)

Licensing service to use for all licensing requests.

This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

Where:

  • http/https: Protocol for connection to the Licensing Gateway Service.
  • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
  • ‹host›: Hostname of the Licensing Gateway Service.
  • ‹port›: Port for connection to the Licensing Gateway Service.

Example: "http://localhost:9999"

Parameters
[in]szLicensingServiceSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Sdk_SetLicensingServiceW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_Sdk_SetLicensingServiceW ( const WCHAR * szLicensingService)

Licensing service to use for all licensing requests.

This property is relevant only for page-based licenses and is used to set the Licensing Gateway Service.

The default is "https://licensing.pdf-tools.com/api/v1/licenses/" for the online Pdftools Licensing Service. If you plan to use the Licensing Gateway Service instead of the Pdftools Licensing Service, the property’s value must be a URI with the following elements:

http[s]://[‹user›[:‹password›]@]‹host›[:‹port›]

Where:

  • http/https: Protocol for connection to the Licensing Gateway Service.
  • ‹user›:‹password› (optional): Credentials for connection to the Licensing Gateway Service (basic authorization).
  • ‹host›: Hostname of the Licensing Gateway Service.
  • ‹port›: Port for connection to the Licensing Gateway Service.

Example: "http://localhost:9999"

Parameters
[in]szLicensingServiceSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_SetLastErrorA()

PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_SetLastErrorA ( TPtx_ErrorCode iErrorCode,
const char * szErrorMessage )

Set last error code and error message.

Register errors by calling this function within a callback body.

Parameters
[in]iErrorCodeSet error code.
[in]szErrorMessageSet null-terminated error message.

◆ Ptx_SetLastErrorW()

PDFTOOLS_TOOLBOX_EXPORT void PDFTOOLS_TOOLBOX_CALL Ptx_SetLastErrorW ( TPtx_ErrorCode iErrorCode,
const WCHAR * szErrorMessage )

Set last error code and error message.

Register errors by calling this function within a callback body.

Parameters
[in]iErrorCodeSet error code.
[in]szErrorMessageSet null-terminated error message.

◆ Ptx_StringMap_Clear()

Remove all entries from the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetA()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetA ( TPtx_StringMap * pStringMap,
const char * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetBegin()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetBegin ( TPtx_StringMap * pStringMap)

Get the position of the first entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from Ptx_StringMap_GetEnd,then the position can be used to retrieve the map entry with Ptx_StringMap_GetKey, Ptx_StringMap_GetValue.

Use Ptx_StringMap_GetNext to get the position of the next entry.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetCount()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetCount ( TPtx_StringMap * pStringMap)

The number of key-value pairs in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetEnd()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetEnd ( TPtx_StringMap * pStringMap)

Get the end position of the map.

This position does not correspond to an actual entry in the map.

It must be used to determine whether the end of the map has been reached when using Ptx_StringMap_GetBegin and Ptx_StringMap_GetNext.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetKeyA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetKeyA ( TPtx_StringMap * pStringMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetKeyW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetKeyW ( TPtx_StringMap * pStringMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetNext()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetNext ( TPtx_StringMap * pStringMap,
int it )

Get the position of the next entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from Ptx_StringMap_GetEnd, then the position can be used to retrieve the map entry with Ptx_StringMap_GetKey and Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetSize()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetSize ( TPtx_StringMap * pStringMap)

The number of key-value pairs in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:
Deprecated
Deprecated in Version 1.1.0.

◆ Ptx_StringMap_GetValueA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetValueA ( TPtx_StringMap * pStringMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetValueW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetValueW ( TPtx_StringMap * pStringMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_GetW()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_GetW ( TPtx_StringMap * pStringMap,
const WCHAR * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with Ptx_StringMap_GetValue.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_Remove()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_Remove ( TPtx_StringMap * pStringMap,
int it )

Remove the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetA ( TPtx_StringMap * pStringMap,
const char * szKey,
const char * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetValueA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetValueA ( TPtx_StringMap * pStringMap,
int it,
const char * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetValueW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetValueW ( TPtx_StringMap * pStringMap,
int it,
const WCHAR * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_StringMap_SetW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL Ptx_StringMap_SetW ( TPtx_StringMap * pStringMap,
const WCHAR * szKey,
const WCHAR * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, Ptx_StringMap_GetEnd, Ptx_StringMap_GetNext, and Ptx_StringMap_Get.

Parameters
[in,out]pStringMapActs as a handle to the native object of type TPtx_StringMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ Ptx_Uninitialize()

Uninitializes the library.

The function that must be called after all the other API functions. Failing to invoke this function results in undefined behavior.