Pdftools SDK
|
Go to the source code of this file.
Functions | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_Initialize () |
Initializes the library. | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_Uninitialize () |
Uninitializes the library. | |
PDFTOOLS_EXPORT TPdfTools_ErrorCode PDFTOOLS_CALL | PdfTools_GetLastError () |
Retrieves the last error code. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_GetLastErrorMessageA (char *pBuffer, size_t nBufferSize) |
Retrieves the last error message. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_GetLastErrorMessageW (WCHAR *pBuffer, size_t nBufferSize) |
Retrieve last error message. | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_SetLastErrorA (TPdfTools_ErrorCode iErrorCode, const char *szErrorMessage) |
Set last error code and error message. | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_SetLastErrorW (TPdfTools_ErrorCode iErrorCode, const WCHAR *szErrorMessage) |
Set last error code and error message. | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_Release (void *pObject) |
Release object. | |
PDFTOOLS_EXPORT void PDFTOOLS_CALL | PdfTools_AddRef (void *pObject) |
Increase reference count of object. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Equals (void *pObject, void *pOther) |
Compare two native objects. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_GetHashCode (void *pObject) |
Get a hash code. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_ConsumptionData_GetRemainingPages (TPdfTools_ConsumptionData *pConsumptionData) |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_ConsumptionData_GetOverconsumption (TPdfTools_ConsumptionData *pConsumptionData) |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_LicenseInfo_IsValid (TPdfTools_LicenseInfo *pLicenseInfo) |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_LicenseInfo_GetExpirationDate (TPdfTools_LicenseInfo *pLicenseInfo, TPdfToolsSys_Date *pExpirationDate) |
PDFTOOLS_EXPORT TPdfTools_ConsumptionData *PDFTOOLS_CALL | PdfTools_LicenseInfo_GetConsumptionData (TPdfTools_LicenseInfo *pLicenseInfo) |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_InitializeA (const char *szLicense, const char *szProducerSuffix) |
Initialize the product and the license key. Before calling any of the other functions of the SDK, a license key must be set by calling this method. For licensing questions, contact pdfsales@pdftools.com. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_InitializeW (const WCHAR *szLicense, const WCHAR *szProducerSuffix) |
Initialize the product and the license key. Before calling any of the other functions of the SDK, a license key must be set by calling this method. For licensing questions, contact pdfsales@pdftools.com. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_AddFontDirectoryA (const char *szDirectory) |
Add custom font directory. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_AddFontDirectoryW (const WCHAR *szDirectory) |
Add custom font directory. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetVersionA (char *pBuffer, size_t nBufferSize) |
The version of the SDK. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetVersionW (WCHAR *pBuffer, size_t nBufferSize) |
The version of the SDK. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetProducerSuffixA (const char *szProducerSuffix) |
The suffix for the producer Suffix that is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName). | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetProducerSuffixW (const WCHAR *szProducerSuffix) |
The suffix for the producer Suffix that is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName). | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetProducerFullNameA (char *pBuffer, size_t nBufferSize) |
The producer string that is set within the metadata of PDF output documents The producer string depends on the license key and producer suffix set in PdfTools_Sdk_Initialize. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetProducerFullNameW (WCHAR *pBuffer, size_t nBufferSize) |
The producer string that is set within the metadata of PDF output documents The producer string depends on the license key and producer suffix set in PdfTools_Sdk_Initialize. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetProxyA (char *pBuffer, size_t nBufferSize) |
Proxy to use for all communication to remote servers. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetProxyW (WCHAR *pBuffer, size_t nBufferSize) |
Proxy to use for all communication to remote servers. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetProxyA (const char *szProxy) |
Proxy to use for all communication to remote servers. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetProxyW (const WCHAR *szProxy) |
Proxy to use for all communication to remote servers. | |
PDFTOOLS_EXPORT TPdfTools_HttpClientHandler *PDFTOOLS_CALL | PdfTools_Sdk_GetHttpClientHandler (void) |
The default handler for communication to remote servers This instance is used wherever there is no dedicated HTTP client handler parameter. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_GetUsageTracking (void) |
Property denoting whether the usage tracking is enabled or disabled. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetUsageTracking (BOOL bUsageTracking) |
Property denoting whether the usage tracking is enabled or disabled. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetLicensingServiceA (char *pBuffer, size_t nBufferSize) |
Licensing service to use for all licensing requests. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_Sdk_GetLicensingServiceW (WCHAR *pBuffer, size_t nBufferSize) |
Licensing service to use for all licensing requests. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetLicensingServiceA (const char *szLicensingService) |
Licensing service to use for all licensing requests. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_Sdk_SetLicensingServiceW (const WCHAR *szLicensingService) |
Licensing service to use for all licensing requests. | |
PDFTOOLS_EXPORT TPdfTools_LicenseInfo *PDFTOOLS_CALL | PdfTools_Sdk_GetLicenseInfoSnapshot (void) |
PDFTOOLS_EXPORT TPdfTools_StringList *PDFTOOLS_CALL | PdfTools_StringList_New (void) |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_StringList_GetCount (TPdfTools_StringList *pStringList) |
Get the number of elements in the list. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_StringList_GetA (TPdfTools_StringList *pStringList, int iIndex, char *pBuffer, size_t nBufferSize) |
Returns the element at the specified position in the given list. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_StringList_GetW (TPdfTools_StringList *pStringList, int iIndex, WCHAR *pBuffer, size_t nBufferSize) |
Returns the element at the specified position in the given list. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_StringList_AddA (TPdfTools_StringList *pStringList, const char *szString) |
Add an element to the end of the list. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_StringList_AddW (TPdfTools_StringList *pStringList, const WCHAR *szString) |
Add an element to the end of the list. | |
PDFTOOLS_EXPORT TPdfTools_MetadataDictionary *PDFTOOLS_CALL | PdfTools_MetadataDictionary_New (void) |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetCount (TPdfTools_MetadataDictionary *pMetadataDictionary) |
The number of key-value pairs in the map. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetSize (TPdfTools_MetadataDictionary *pMetadataDictionary) |
The number of key-value pairs in the map. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetBegin (TPdfTools_MetadataDictionary *pMetadataDictionary) |
Get the position of the first entry in the map. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetEnd (TPdfTools_MetadataDictionary *pMetadataDictionary) |
Get the end position of the map. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetNext (TPdfTools_MetadataDictionary *pMetadataDictionary, int it) |
Get the position of the next entry in the map. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetA (TPdfTools_MetadataDictionary *pMetadataDictionary, 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 PdfTools_MetadataDictionary_GetValue. | |
PDFTOOLS_EXPORT int PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetW (TPdfTools_MetadataDictionary *pMetadataDictionary, 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 PdfTools_MetadataDictionary_GetValue. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetKeyA (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, char *pBuffer, size_t nBufferSize) |
Get the key of the entry given a position. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetKeyW (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, WCHAR *pBuffer, size_t nBufferSize) |
Get the key of the entry given a position. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetValueA (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, char *pBuffer, size_t nBufferSize) |
Get the value of the entry given a position. | |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL | PdfTools_MetadataDictionary_GetValueW (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, WCHAR *pBuffer, size_t nBufferSize) |
Get the value of the entry given a position. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_SetA (TPdfTools_MetadataDictionary *pMetadataDictionary, 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, PdfTools_MetadataDictionary_GetEnd, PdfTools_MetadataDictionary_GetNext, and PdfTools_MetadataDictionary_Get. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_SetW (TPdfTools_MetadataDictionary *pMetadataDictionary, 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, PdfTools_MetadataDictionary_GetEnd, PdfTools_MetadataDictionary_GetNext, and PdfTools_MetadataDictionary_Get. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_SetValueA (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, const char *szValue) |
Set the value of the entry at a position in the map. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_SetValueW (TPdfTools_MetadataDictionary *pMetadataDictionary, int it, const WCHAR *szValue) |
Set the value of the entry at a position in the map. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_Clear (TPdfTools_MetadataDictionary *pMetadataDictionary) |
Remove all entries from the map. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_MetadataDictionary_Remove (TPdfTools_MetadataDictionary *pMetadataDictionary, int it) |
Remove the entry at a position in the map. | |
PDFTOOLS_EXPORT TPdfTools_HttpClientHandler *PDFTOOLS_CALL | PdfTools_HttpClientHandler_New (void) |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_SetClientCertificateA (TPdfTools_HttpClientHandler *pHttpClientHandler, const TPdfToolsSys_StreamDescriptor *pArchive, const char *szPassword) |
Set the SSL/TLS client certificate as PFX (PKCS#12) archive The file must contain the certificate itself, all certificates of the trust chain, and the private key. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_SetClientCertificateW (TPdfTools_HttpClientHandler *pHttpClientHandler, const TPdfToolsSys_StreamDescriptor *pArchive, const WCHAR *szPassword) |
Set the SSL/TLS client certificate as PFX (PKCS#12) archive The file must contain the certificate itself, all certificates of the trust chain, and the private key. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_SetClientCertificateAndKeyA (TPdfTools_HttpClientHandler *pHttpClientHandler, const TPdfToolsSys_StreamDescriptor *pCert, const TPdfToolsSys_StreamDescriptor *pKey, const char *szPassword) |
Set the SSL/TLS client certificate and private key The file must contain the certificate and its private key. It is also recommended to include all certificates of the trust chain. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_SetClientCertificateAndKeyW (TPdfTools_HttpClientHandler *pHttpClientHandler, const TPdfToolsSys_StreamDescriptor *pCert, const TPdfToolsSys_StreamDescriptor *pKey, const WCHAR *szPassword) |
Set the SSL/TLS client certificate and private key The file must contain the certificate and its private key. It is also recommended to include all certificates of the trust chain. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_AddTrustedCertificate (TPdfTools_HttpClientHandler *pHttpClientHandler, const TPdfToolsSys_StreamDescriptor *pCert) |
Add a certificate to the trust store Add a certificate to the trust store of this HttpClientHandler instance. The certificates in the trust store are used to verify the certificate of the SSL/TLS server (see TPdfTools_HttpClientHandler). You should add trusted certification authorities (Root CA) certificates to the trust store. However, you can also add server certificates (e.g. self-signed certificates) and intermediate CA certificates. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_GetSslVerifyServerCertificate (TPdfTools_HttpClientHandler *pHttpClientHandler) |
Verify the server certificate for SSL/TLS. | |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL | PdfTools_HttpClientHandler_SetSslVerifyServerCertificate (TPdfTools_HttpClientHandler *pHttpClientHandler, BOOL bSslVerifyServerCertificate) |
Verify the server certificate for SSL/TLS. | |
#define PDFTOOLS_CALL |
#define PdfTools_GetLastErrorMessage PdfTools_GetLastErrorMessageA |
#define PdfTools_HttpClientHandler_SetClientCertificate PdfTools_HttpClientHandler_SetClientCertificateA |
#define PdfTools_HttpClientHandler_SetClientCertificateAndKey PdfTools_HttpClientHandler_SetClientCertificateAndKeyA |
#define PdfTools_MetadataDictionary_Get PdfTools_MetadataDictionary_GetA |
#define PdfTools_MetadataDictionary_GetKey PdfTools_MetadataDictionary_GetKeyA |
#define PdfTools_MetadataDictionary_GetValue PdfTools_MetadataDictionary_GetValueA |
#define PdfTools_MetadataDictionary_Set PdfTools_MetadataDictionary_SetA |
#define PdfTools_MetadataDictionary_SetValue PdfTools_MetadataDictionary_SetValueA |
#define PdfTools_Sdk_AddFontDirectory PdfTools_Sdk_AddFontDirectoryA |
#define PdfTools_Sdk_GetLicensingService PdfTools_Sdk_GetLicensingServiceA |
#define PdfTools_Sdk_GetProducerFullName PdfTools_Sdk_GetProducerFullNameA |
#define PdfTools_Sdk_GetProxy PdfTools_Sdk_GetProxyA |
#define PdfTools_Sdk_GetVersion PdfTools_Sdk_GetVersionA |
#define PdfTools_Sdk_Initialize PdfTools_Sdk_InitializeA |
#define PdfTools_Sdk_SetLicensingService PdfTools_Sdk_SetLicensingServiceA |
#define PdfTools_Sdk_SetProducerSuffix PdfTools_Sdk_SetProducerSuffixA |
#define PdfTools_Sdk_SetProxy PdfTools_Sdk_SetProxyA |
#define PdfTools_StringList_Add PdfTools_StringList_AddA |
#define PdfTools_StringList_Get PdfTools_StringList_GetA |
PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_AddRef | ( | void * | pObject | ) |
Increase reference count of object.
Internally, the reference count is incremented by 1
.
[in,out] | pObject | Object which reference count should be incremented by 1 . |
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_ConsumptionData_GetOverconsumption | ( | TPdfTools_ConsumptionData * | pConsumptionData | ) |
Denotes the number of pages left to consume in the over-consumption state. The over-consumption state begins after all PdfTools_ConsumptionData_GetRemainingPages are consumed. When this value reaches zero, a license error is thrown for every attempt to use the SDK.
[in,out] | pConsumptionData | Acts as a handle to the native object of type TPdfTools_ConsumptionData. |
May indicate an error in certain scenarios. For further information see the note section below.
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_ConsumptionData_GetRemainingPages | ( | TPdfTools_ConsumptionData * | pConsumptionData | ) |
Denotes the number of pages left to consume before entering the over-consumption state. When this value reaches zero, the SDK can still be used as long as PdfTools_ConsumptionData_GetOverconsumption is positive.
[in,out] | pConsumptionData | Acts as a handle to the native object of type TPdfTools_ConsumptionData. |
May indicate an error in certain scenarios. For further information see the note section below.
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Equals | ( | void * | pObject, |
void * | pOther ) |
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_GetHashCode | ( | void * | pObject | ) |
Get a hash code.
Get a hash code for a given native object.
[in] | pObject | Pointer to the object for which a hash code is calculated. |
PDFTOOLS_EXPORT TPdfTools_ErrorCode PDFTOOLS_CALL PdfTools_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 ePdfTools_Error_Success.
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_GetLastErrorMessageA | ( | char * | pBuffer, |
size_t | nBufferSize ) |
Retrieves the last error message.
Gets a detailed error message.
[out] | pBuffer | The 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] | nBufferSize | The number of characters to be copied to pBuffer . |
pBuffer
. 0
if there is an error. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_GetLastErrorMessageW | ( | WCHAR * | pBuffer, |
size_t | nBufferSize ) |
Retrieve last error message.
Gets a detailed error message.
[out] | pBuffer | The 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_AddTrustedCertificate | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
const TPdfToolsSys_StreamDescriptor * | pCert ) |
Add a certificate to the trust store Add a certificate to the trust store of this HttpClientHandler
instance. The certificates in the trust store are used to verify the certificate of the SSL/TLS server (see TPdfTools_HttpClientHandler). You should add trusted certification authorities (Root CA) certificates to the trust store. However, you can also add server certificates (e.g. self-signed certificates) and intermediate CA certificates.
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | pCert | The certificate may be in either PEM (.pem, ASCII text) or DER (.cer, binary) form. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_GetSslVerifyServerCertificate | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler | ) |
Verify the server certificate for SSL/TLS.
If TRUE the server certificate's trustworthiness is verified. If the verification process fails, the handshake is immediately terminated and the connection is aborted. The verification requires a trust store; otherwise, verification always fails.
Default: TRUE
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
May indicate an error in certain scenarios. For further information see the note section below.
PDFTOOLS_EXPORT TPdfTools_HttpClientHandler *PDFTOOLS_CALL PdfTools_HttpClientHandler_New | ( | void | ) |
The default values of newly created objects are not copied from the default handler PdfTools_Sdk_GetHttpClientHandler, but are as described in this documentation.
NULL
if there is an error.
NULL
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_SetClientCertificateA | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
const TPdfToolsSys_StreamDescriptor * | pArchive, | ||
const char * | szPassword ) |
Set the SSL/TLS client certificate as PFX (PKCS#12) archive The file must contain the certificate itself, all certificates of the trust chain, and the private key.
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | pArchive | The SSL client certificate in PKCS#12 format (.p12, .pfx) |
[in] | szPassword | The password required to decrypt the private key of the archive |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_SetClientCertificateAndKeyA | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
const TPdfToolsSys_StreamDescriptor * | pCert, | ||
const TPdfToolsSys_StreamDescriptor * | pKey, | ||
const char * | szPassword ) |
Set the SSL/TLS client certificate and private key The file must contain the certificate and its private key. It is also recommended to include all certificates of the trust chain.
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | pCert | The certificate may be in either PEM (.pem, ASCII text) or DER (.cer, binary) form. |
[in] | pKey | The encrypted private key of the certificate must be in PEM (ASCII text) form (.pem). |
[in] | szPassword | The password required to decrypt the private key. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_SetClientCertificateAndKeyW | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
const TPdfToolsSys_StreamDescriptor * | pCert, | ||
const TPdfToolsSys_StreamDescriptor * | pKey, | ||
const WCHAR * | szPassword ) |
Set the SSL/TLS client certificate and private key The file must contain the certificate and its private key. It is also recommended to include all certificates of the trust chain.
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | pCert | The certificate may be in either PEM (.pem, ASCII text) or DER (.cer, binary) form. |
[in] | pKey | The encrypted private key of the certificate must be in PEM (ASCII text) form (.pem). |
[in] | szPassword | The password required to decrypt the private key. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_SetClientCertificateW | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
const TPdfToolsSys_StreamDescriptor * | pArchive, | ||
const WCHAR * | szPassword ) |
Set the SSL/TLS client certificate as PFX (PKCS#12) archive The file must contain the certificate itself, all certificates of the trust chain, and the private key.
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | pArchive | The SSL client certificate in PKCS#12 format (.p12, .pfx) |
[in] | szPassword | The password required to decrypt the private key of the archive |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_HttpClientHandler_SetSslVerifyServerCertificate | ( | TPdfTools_HttpClientHandler * | pHttpClientHandler, |
BOOL | bSslVerifyServerCertificate ) |
Verify the server certificate for SSL/TLS.
If TRUE the server certificate's trustworthiness is verified. If the verification process fails, the handshake is immediately terminated and the connection is aborted. The verification requires a trust store; otherwise, verification always fails.
Default: TRUE
[in,out] | pHttpClientHandler | Acts as a handle to the native object of type TPdfTools_HttpClientHandler. |
[in] | bSslVerifyServerCertificate | Set value. |
PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_Initialize | ( | ) |
Initializes the library.
The function that must be called before any other API function. Failing to invoke this function results in undefined behavior.
PDFTOOLS_EXPORT TPdfTools_ConsumptionData *PDFTOOLS_CALL PdfTools_LicenseInfo_GetConsumptionData | ( | TPdfTools_LicenseInfo * | pLicenseInfo | ) |
This property exists only for page-based licenses. It is NULL
for all other licenses.
[in,out] | pLicenseInfo | Acts as a handle to the native object of type TPdfTools_LicenseInfo. |
NULL
if either an error occurred or the returned object is actually NULL
. To determine if an error has occurred, check the error code as described in the note section below.
NULL
was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_LicenseInfo_GetExpirationDate | ( | TPdfTools_LicenseInfo * | pLicenseInfo, |
TPdfToolsSys_Date * | pExpirationDate ) |
The license expiration date.
[in,out] | pLicenseInfo | Acts as a handle to the native object of type TPdfTools_LicenseInfo. |
[out] | pExpirationDate | Retrieved value. |
[out]
argument returns NULL
. To determine if an error has occurred, check the error code as described in the note section below. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_LicenseInfo_IsValid | ( | TPdfTools_LicenseInfo * | pLicenseInfo | ) |
Denotes whether the license is valid.
[in,out] | pLicenseInfo | Acts as a handle to the native object of type TPdfTools_LicenseInfo. |
May indicate an error in certain scenarios. For further information see the note section below.
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_Clear | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary | ) |
Remove all entries from the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetA | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
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 PdfTools_MetadataDictionary_GetValue.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | szKey |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetBegin | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary | ) |
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 PdfTools_MetadataDictionary_GetEnd,then the position can be used to retrieve the map entry with PdfTools_MetadataDictionary_GetKey, PdfTools_MetadataDictionary_GetValue.
Use PdfTools_MetadataDictionary_GetNext to get the position of the next entry.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetCount | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary | ) |
The number of key-value pairs in the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetEnd | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary | ) |
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 PdfTools_MetadataDictionary_GetBegin and PdfTools_MetadataDictionary_GetNext.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_MetadataDictionary_GetKeyA | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
char * | pBuffer, | ||
size_t | nBufferSize ) |
Get the key of the entry given a position.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_MetadataDictionary_GetKeyW | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
WCHAR * | pBuffer, | ||
size_t | nBufferSize ) |
Get the key of the entry given a position.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetNext | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
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 PdfTools_MetadataDictionary_GetEnd, then the position can be used to retrieve the map entry with PdfTools_MetadataDictionary_GetKey and PdfTools_MetadataDictionary_GetValue.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetSize | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary | ) |
The number of key-value pairs in the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_MetadataDictionary_GetValueA | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
char * | pBuffer, | ||
size_t | nBufferSize ) |
Get the value of the entry given a position.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_MetadataDictionary_GetValueW | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
WCHAR * | pBuffer, | ||
size_t | nBufferSize ) |
Get the value of the entry given a position.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_MetadataDictionary_GetW | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
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 PdfTools_MetadataDictionary_GetValue.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | szKey |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT TPdfTools_MetadataDictionary *PDFTOOLS_CALL PdfTools_MetadataDictionary_New | ( | void | ) |
NULL
if there is an error.
NULL
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_Remove | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it ) |
Remove the entry at a position in the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_SetA | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
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, PdfTools_MetadataDictionary_GetEnd, PdfTools_MetadataDictionary_GetNext, and PdfTools_MetadataDictionary_Get.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | szKey | |
[in] | szValue |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_SetValueA | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
const char * | szValue ) |
Set the value of the entry at a position in the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[in] | szValue |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_SetValueW | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
int | it, | ||
const WCHAR * | szValue ) |
Set the value of the entry at a position in the map.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | it | |
[in] | szValue |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_MetadataDictionary_SetW | ( | TPdfTools_MetadataDictionary * | pMetadataDictionary, |
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, PdfTools_MetadataDictionary_GetEnd, PdfTools_MetadataDictionary_GetNext, and PdfTools_MetadataDictionary_Get.
[in,out] | pMetadataDictionary | Acts as a handle to the native object of type TPdfTools_MetadataDictionary. |
[in] | szKey | |
[in] | szValue |
PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_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.
[in] | pObject | Object to be released. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_AddFontDirectoryA | ( | const char * | szDirectory | ) |
Add custom font directory.
[in] | szDirectory | The path of the directory which contains additional font files to be considered during processing. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_AddFontDirectoryW | ( | const WCHAR * | szDirectory | ) |
Add custom font directory.
[in] | szDirectory | The path of the directory which contains additional font files to be considered during processing. |
PDFTOOLS_EXPORT TPdfTools_HttpClientHandler *PDFTOOLS_CALL PdfTools_Sdk_GetHttpClientHandler | ( | void | ) |
The default handler for communication to remote servers This instance is used wherever there is no dedicated HTTP client handler parameter.
NULL
if there is an error.
NULL
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT TPdfTools_LicenseInfo *PDFTOOLS_CALL PdfTools_Sdk_GetLicenseInfoSnapshot | ( | void | ) |
A new snapshot is created whenever this property is accessed.
Note: PdfTools_Sdk_Initialize />must be called before accessing license information. Otherwise, the license is considered invalid.
NULL
if there is an error.
NULL
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_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"
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_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"
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetProducerFullNameA | ( | char * | pBuffer, |
size_t | nBufferSize ) |
The producer string that is set within the metadata of PDF output documents The producer string depends on the license key and producer suffix set in PdfTools_Sdk_Initialize.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetProducerFullNameW | ( | WCHAR * | pBuffer, |
size_t | nBufferSize ) |
The producer string that is set within the metadata of PDF output documents The producer string depends on the license key and producer suffix set in PdfTools_Sdk_Initialize.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetProxyA | ( | char * | pBuffer, |
size_t | nBufferSize ) |
Proxy to use for all communication to remote servers.
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is NULL
, i.e. no proxy is used. Otherwise 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 proxy.‹user›:‹password›
(optional): Credentials for connection to proxy (basic authorization).‹host›
: Hostname of proxy.‹port›
: Port for connection to proxy.Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if either an error occurred or the returned buffer is actually NULL
. To determine if an error has occurred, check the error code as described in the note section below. 0
was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetProxyW | ( | WCHAR * | pBuffer, |
size_t | nBufferSize ) |
Proxy to use for all communication to remote servers.
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is NULL
, i.e. no proxy is used. Otherwise 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 proxy.‹user›:‹password›
(optional): Credentials for connection to proxy (basic authorization).‹host›
: Hostname of proxy.‹port›
: Port for connection to proxy.Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if either an error occurred or the returned buffer is actually NULL
. To determine if an error has occurred, check the error code as described in the note section below. 0
was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_GetUsageTracking | ( | void | ) |
Property denoting whether the usage tracking is enabled or disabled.
The SDK is allowed to track usage when this property is set to TRUE. The collected data includes only non-sensitive information, such as the features used, the document type, the number of pages, etc.
The default is TRUE, i.e. usage tracking is enabled.
May indicate an error in certain scenarios. For further information see the note section below.
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetVersionA | ( | char * | pBuffer, |
size_t | nBufferSize ) |
The version of the SDK.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_Sdk_GetVersionW | ( | WCHAR * | pBuffer, |
size_t | nBufferSize ) |
The version of the SDK.
[out] | pBuffer | Retrieved 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_InitializeA | ( | const char * | szLicense, |
const char * | szProducerSuffix ) |
Initialize the product and the license key. Before calling any of the other functions of the SDK, a license key must be set by calling this method. For licensing questions, contact pdfsales@pdftools.com.
[in] | szLicense | The license key. The format of the license key is "<PDFSDK,V1,...>" |
[in] | szProducerSuffix | If neither NULL nor empty, this string is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName). |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_InitializeW | ( | const WCHAR * | szLicense, |
const WCHAR * | szProducerSuffix ) |
Initialize the product and the license key. Before calling any of the other functions of the SDK, a license key must be set by calling this method. For licensing questions, contact pdfsales@pdftools.com.
[in] | szLicense | The license key. The format of the license key is "<PDFSDK,V1,...>" |
[in] | szProducerSuffix | If neither NULL nor empty, this string is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName). |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_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"
[in] | szLicensingService | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_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"
[in] | szLicensingService | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_SetProducerSuffixA | ( | const char * | szProducerSuffix | ) |
The suffix for the producer Suffix that is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName).
[in] | szProducerSuffix | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_SetProducerSuffixW | ( | const WCHAR * | szProducerSuffix | ) |
The suffix for the producer Suffix that is appended to the producer string within metadata of PDF output documents (see PdfTools_Sdk_GetProducerFullName).
[in] | szProducerSuffix | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_SetProxyA | ( | const char * | szProxy | ) |
Proxy to use for all communication to remote servers.
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is NULL
, i.e. no proxy is used. Otherwise 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 proxy.‹user›:‹password›
(optional): Credentials for connection to proxy (basic authorization).‹host›
: Hostname of proxy.‹port›
: Port for connection to proxy.Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
[in] | szProxy | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_SetProxyW | ( | const WCHAR * | szProxy | ) |
Proxy to use for all communication to remote servers.
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is NULL
, i.e. no proxy is used. Otherwise 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 proxy.‹user›:‹password›
(optional): Credentials for connection to proxy (basic authorization).‹host›
: Hostname of proxy.‹port›
: Port for connection to proxy.Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
[in] | szProxy | Set value. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_Sdk_SetUsageTracking | ( | BOOL | bUsageTracking | ) |
Property denoting whether the usage tracking is enabled or disabled.
The SDK is allowed to track usage when this property is set to TRUE. The collected data includes only non-sensitive information, such as the features used, the document type, the number of pages, etc.
The default is TRUE, i.e. usage tracking is enabled.
[in] | bUsageTracking | Set value. |
PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_SetLastErrorA | ( | TPdfTools_ErrorCode | iErrorCode, |
const char * | szErrorMessage ) |
Set last error code and error message.
Register errors by calling this function within a callback body.
[in] | iErrorCode | Set error code. |
[in] | szErrorMessage | Set null-terminated error message. |
PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_SetLastErrorW | ( | TPdfTools_ErrorCode | iErrorCode, |
const WCHAR * | szErrorMessage ) |
Set last error code and error message.
Register errors by calling this function within a callback body.
[in] | iErrorCode | Set error code. |
[in] | szErrorMessage | Set null-terminated error message. |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_StringList_AddA | ( | TPdfTools_StringList * | pStringList, |
const char * | szString ) |
Add an element to the end of the list.
[in,out] | pStringList | Acts as a handle to the native object of type TPdfTools_StringList. |
[in] | szString |
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfTools_StringList_AddW | ( | TPdfTools_StringList * | pStringList, |
const WCHAR * | szString ) |
Add an element to the end of the list.
[in,out] | pStringList | Acts as a handle to the native object of type TPdfTools_StringList. |
[in] | szString |
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_StringList_GetA | ( | TPdfTools_StringList * | pStringList, |
int | iIndex, | ||
char * | pBuffer, | ||
size_t | nBufferSize ) |
Returns the element at the specified position in the given list.
[in,out] | pStringList | Acts as a handle to the native object of type TPdfTools_StringList. |
[in] | iIndex | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfTools_StringList_GetCount | ( | TPdfTools_StringList * | pStringList | ) |
Get the number of elements in the list.
[in,out] | pStringList | Acts as a handle to the native object of type TPdfTools_StringList. |
0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfTools_StringList_GetW | ( | TPdfTools_StringList * | pStringList, |
int | iIndex, | ||
WCHAR * | pBuffer, | ||
size_t | nBufferSize ) |
Returns the element at the specified position in the given list.
[in,out] | pStringList | Acts as a handle to the native object of type TPdfTools_StringList. |
[in] | iIndex | |
[out] | pBuffer | 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] | nBufferSize | The buffer size of the retrieved string pBuffer . |
pBuffer
. 0
if there is an error. 0
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:
PDFTOOLS_EXPORT TPdfTools_StringList *PDFTOOLS_CALL PdfTools_StringList_New | ( | void | ) |
NULL
if there is an error.
NULL
was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. PDFTOOLS_EXPORT void PDFTOOLS_CALL PdfTools_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.