SignDoc SDK (C)  5.0.0
SIGNDOC_DocumentLoader Class Reference

Create SIGNDOC_Document objects. More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_DocumentLoaderSIGNDOC_DocumentLoader_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_DocumentLoader constructor. More...
 
void SIGNDOC_DocumentLoader_delete (struct SIGNDOC_DocumentLoader *aObj)
 SIGNDOC_DocumentLoader destructor. More...
 
int SIGNDOC_DocumentLoader_loadFromMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aData, size_t aSize, SIGNDOC_Boolean aCopy, struct SIGNDOC_Document **aOutput)
 Load a document from memory. More...
 
int SIGNDOC_DocumentLoader_loadFromFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding, const char *aPath, SIGNDOC_Boolean aWritable, struct SIGNDOC_Document **aOutput)
 Load a document from a file. More...
 
int SIGNDOC_DocumentLoader_loadFromFileW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const wchar_t *aPath, SIGNDOC_Boolean aWritable, struct SIGNDOC_Document **aOutput)
 Load a document from a file. More...
 
int SIGNDOC_DocumentLoader_createPDF (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aMajor, int aMinor, struct SIGNDOC_Document **aOutput)
 Create an empty PDF document. More...
 
int SIGNDOC_DocumentLoader_createPDFA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aMajor, int aMinor, const char *aConformance, const unsigned char *aICCPtr, size_t aICCSize, struct SIGNDOC_Document **aOutput)
 Create an empty PDF document. More...
 
int SIGNDOC_DocumentLoader_ping (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream)
 Determine the type of a document. More...
 
int SIGNDOC_DocumentLoader_pingMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize)
 Determine the type of a document. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding, const char *aPath)
 Load font configuration from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigFileW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const wchar_t *aPath)
 Load font configuration from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigEnvironment (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const char *aName)
 Load font configuration from files specified by an environment variable. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream, int aEncoding, const char *aDirectory)
 Load font configuration from a stream. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigStreamW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream, const wchar_t *aDirectory)
 Load font configuration from a stream. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize, int aEncoding, const char *aDirectory)
 Load font configuration from a blob. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigBlobW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize, const wchar_t *aDirectory)
 Load font configuration from a blob. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding, const char *aPath)
 Load font configuration for rendering PDF documents from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigFileW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const wchar_t *aPath)
 Load font configuration for rendering PDF documents from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const char *aName)
 Load font configuration for rendering PDF documents from files specified by an environment variable. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream, int aEncoding, const char *aDirectory)
 Load font configuration for rendering PDF documents from a stream. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigStreamW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream, const wchar_t *aDirectory)
 Load font configuration for rendering PDF documents from a stream. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize, int aEncoding, const char *aDirectory)
 Load font configuration for rendering PDF documents from a blob. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigBlobW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize, const wchar_t *aDirectory)
 Load font configuration for rendering PDF documents from a blob. More...
 
void SIGNDOC_DocumentLoader_getFailedFontFiles (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_StringArray *aOutput)
 Get the pathnames of font files that failed to load for the most recent SIGNDOC_DocumentLoader_loadFontConfig*() or SIGNDOC_DocumentLoader_loadPdfFontConfig*() call. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding, const char *aPath)
 Load trusted root CA certifcates from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const wchar_t *aPath)
 Load trusted root CA certifcates from a file. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_InputStream *aStream)
 Load trusted root CA certifcates from a stream. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, const unsigned char *aPtr, size_t aSize)
 Load trusted root CA certifcates from a blob. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_initLogging (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding, const char *aLevel, const char *aPathname)
 Initialize logging. More...
 
const char * SIGNDOC_DocumentLoader_getErrorMessage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, int aEncoding)
 Get an error message for the last SIGNDOC_DocumentLoader_load*() SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging() call. More...
 
const wchar_t * SIGNDOC_DocumentLoader_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_DocumentLoader *aObj)
 Get an error message for the last SIGNDOC_DocumentLoader_load*(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging() call. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_registerDocumentHandler (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, struct SIGNDOC_DocumentHandler *aHandler)
 Register a document handler. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_setLicenseKey (struct SIGNDOC_Exception **aEx, const void *aKeyPtr, size_t aKeySize, const char *aProduct, const char *aVersion, const void *aTokenPtr, size_t aTokenSize)
 Initialize license management with license key. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_generateLicenseToken (struct SIGNDOC_Exception **aEx, const char *aProduct, struct SIGNDOC_ByteArray *aOutput)
 Generate a license token for other SDKs also covered by the license key passed to SIGNDOC_DocumentLoader_setLicenseKey(). More...
 
int SIGNDOC_DocumentLoader_getRemainingDays (struct SIGNDOC_Exception **aEx, int aWhat)
 Get the number of days until the license will expire. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_getVersionNumber (struct SIGNDOC_Exception **aEx, char **aVersion)
 Get the version number of SignDoc SDK. More...
 
SIGNDOC_Boolean SIGNDOC_DocumentLoader_getComponentVersionNumber (struct SIGNDOC_Exception **aEx, const char *aComponent, char **aVersion)
 Get the version number of a SignDoc SDK component. More...
 
int SIGNDOC_DocumentLoader_getLicenseTextCount (struct SIGNDOC_Exception **aEx)
 Get the number of license texts. More...
 
const char * SIGNDOC_DocumentLoader_getLicenseText (struct SIGNDOC_Exception **aEx, int aIndex)
 Get a license text. More...
 
void SIGNDOC_DocumentLoader_setFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_DocumentLoader *aObj, unsigned aFlags)
 Set flags modifying the behavior of this SIGNDOC_DocumentLoader object and of the SIGNDOC_Document objects created by it. More...
 

Detailed Description

Create SIGNDOC_Document objects.

Use SIGNDOC_DocumentLoader_getErrorMessage() or SIGNDOC_DocumentLoader_getErrorMessageW() to get more information after a function call failed.

As the error message is stored in this object, each thread should have its own instance of SIGNDOC_DocumentLoader or synchronization should be used.

Unless you need differently configured SIGNDOC_DocumentLoader objects, you should have only one SIGNDOC_DocumentLoader object per process (but see above). Loading font configuration files can be expensive, in particular if many fonts have to be scanned.

To be able to load documents, you have to register at least one document handler by passing a pointer to a SIGNDOC_DocumentHandler object to SIGNDOC_DocumentLoader_registerDocumentHandler().

Member Function Documentation

int SIGNDOC_DocumentLoader_createPDF ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aMajor,
int  aMinor,
struct SIGNDOC_Document **  aOutput 
)

Create an empty PDF document.

The PDF document is invalid until you add at least one page. SIGNDOC_Document_addSignature() cannot be used until the document has been saved.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aMajorMajor PDF version, must be 1 or 2.
[in]aMinorMinor PDF version, must be 0 through 7 (if aMajor is 1) or 0 (if aMajor is 2).
[out]aOutputA pointer to a new SIGNDOC_Document object representing the document will be stored into the object pointed to by this argument. The caller is responsible for destroying the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_DocumentLoader_createPDFA(), SIGNDOC_DocumentLoader_getErrorMessage()
int SIGNDOC_DocumentLoader_createPDFA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aMajor,
int  aMinor,
const char *  aConformance,
const unsigned char *  aICCPtr,
size_t  aICCSize,
struct SIGNDOC_Document **  aOutput 
)

Create an empty PDF document.

The PDF document is invalid until you add at least one page. SIGNDOC_Document_addSignature() cannot be used until the document has been saved.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aMajorMajor PDF version, must be 1.
[in]aMinorMinor PDF version, must be 0 through 7.
[in]aConformancePDF/A conformance. The string pointed to by this argument must consist of two characters:
  • A digit (1 through 3) specifying the part of PDF/A the document shall conform to.
  • A letter ('A' or 'B' if the digit is '1', 'A', 'B', or 'U' of the digit is '2' or '3') specifying the PDF/A conformance.
For instance, use "2B" for PDF/A-2b.
[in]aICCPtrA pointer to the first octet of the ICC profile of the PDF/A output intent or NULL if no output intent shall be added to the document.
[in]aICCSizeNumber of octets pointed to by aICCPtr or 0 if aICCPtr is NULL.
[out]aOutputA pointer to a new SIGNDOC_Document object representing the document will be stored into the object pointed to by this argument. The caller is responsible for destroying the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_DocumentLoader_createPDF(), SIGNDOC_DocumentLoader_getErrorMessage()
void SIGNDOC_DocumentLoader_delete ( struct SIGNDOC_DocumentLoader aObj)

SIGNDOC_DocumentLoader destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
SIGNDOC_Boolean SIGNDOC_DocumentLoader_generateLicenseToken ( struct SIGNDOC_Exception **  aEx,
const char *  aProduct,
struct SIGNDOC_ByteArray aOutput 
)

Generate a license token for other SDKs also covered by the license key passed to SIGNDOC_DocumentLoader_setLicenseKey().

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aProductThe name of the product which shall be able to use the license key without providing a product version.
[in,out]aOutputThe token will be stored here.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_setLicenseKey()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_getComponentVersionNumber ( struct SIGNDOC_Exception **  aEx,
const char *  aComponent,
char **  aVersion 
)

Get the version number of a SignDoc SDK component.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aComponentThe component. Currently supported are "sppdf", "splm2", and "spooc".
[out]aVersionThe version number will be stored here. It consists of 3 or 4 integers separated by dots, .e.g., "1.9.27.". The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getVersionNumber()
const char * SIGNDOC_DocumentLoader_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding 
)

Get an error message for the last SIGNDOC_DocumentLoader_load*() SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging() call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last call of SIGNDOC_DocumentLoader_load*(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging(). The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_DocumentLoader_getErrorMessageW(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream(), SIGNDOC_DocumentLoader_loadFontConfigStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory()
const wchar_t * SIGNDOC_DocumentLoader_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_DocumentLoader aObj 
)

Get an error message for the last SIGNDOC_DocumentLoader_load*(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging() call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
Returns
A pointer to a string describing the reason for the failure of the last call of SIGNDOC_DocumentLoader_load*(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory(), or SIGNDOC_DocumentLoader_initLogging(). The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_load(), SIGNDOC_DocumentLoader_ping(), SIGNDOC_DocumentLoader_pingMemory()
void SIGNDOC_DocumentLoader_getFailedFontFiles ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_StringArray aOutput 
)

Get the pathnames of font files that failed to load for the most recent SIGNDOC_DocumentLoader_loadFontConfig*() or SIGNDOC_DocumentLoader_loadPdfFontConfig*() call.

This includes files that could not be found and files that could not be loaded. In the former case, the pathname may contain wildcard characters.

Note that SIGNDOC_DocumentLoader_loadFontConfig*() and SIGNDOC_DocumentLoader_loadPdfFontConfig() no longer fail if a specified font file cannot be found or loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in,out]aOutputThe pathnames will be stored here.
See also
SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
const char * SIGNDOC_DocumentLoader_getLicenseText ( struct SIGNDOC_Exception **  aEx,
int  aIndex 
)

Get a license text.

SignDoc SDK includes several Open Source components. You can retrieve the license texts one by one.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aIndexThe zero-based index of the license text.
Returns
A pointer to the null-terminated license text. Lines are terminated by LF characters. If aIndex is invalid, NULL will be returned.
See also
SIGNDOC_DocumentLoader_getLicenseTextCount()
int SIGNDOC_DocumentLoader_getLicenseTextCount ( struct SIGNDOC_Exception **  aEx)

Get the number of license texts.

SignDoc SDK includes several Open Source components. You can retrieve the license texts one by one.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
The number of license texts.
See also
SIGNDOC_DocumentLoader_getLicenseText()
int SIGNDOC_DocumentLoader_getRemainingDays ( struct SIGNDOC_Exception **  aEx,
int  aWhat 
)

Get the number of days until the license will expire.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aWhatSelect which expiry date shall be used (SIGNDOC_DOCUMENTLOADER_REMAININGDAYS_PRODUCT or SIGNDOC_DOCUMENTLOADER_REMAININGDAYS_SIGNING).
Returns
-1 if the license has already expired or is invalid, 0 if the license will expire today, a positive value for the number of days the license is still valid. For licenses without expiry date, that will be several millions of days.
SIGNDOC_Boolean SIGNDOC_DocumentLoader_getVersionNumber ( struct SIGNDOC_Exception **  aEx,
char **  aVersion 
)

Get the version number of SignDoc SDK.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[out]aVersionThe version number will be stored here. It consists of 3 integers separated by dots, .e.g., "1.16.7" The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getComponentVersionNumber()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_initLogging ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding,
const char *  aLevel,
const char *  aPathname 
)

Initialize logging.

This function initializes logging for all threads of the current process. This function takes a pointer to a SIGNDOC_Document object to enable SIGNDOC_Document_getErrorMessage(); the logging configuration is not restricted to the SIGNDOC_DocumentLoader object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding of the string pointed to by aPathname (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aLevelThe logging level: "0" (log nothing) through "5" (log everything), optionally followed by "T" to log process and thread IDs.
[in]aPathnameThe pathname of the log file. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on failure.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_logLine()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize,
int  aEncoding,
const char *  aDirectory 
)

Load font configuration from a blob.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob containing the XML document.
[in]aSizeThe number of octets pointed to by aPtr.
[in]aEncodingThe encoding of the string pointed to by aDirectory (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlobW(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigBlobW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize,
const wchar_t *  aDirectory 
)

Load font configuration from a blob.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob containing the XML document.
[in]aSizeThe number of octets pointed to by aPtr.
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigEnvironment ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const char *  aName 
)

Load font configuration from files specified by an environment variable.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

Under Windows, directories are separated by semicolons. Under Unix, directories are separated by colons.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aNameThe name of the environment variable.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding,
const char *  aPath 
)

Load font configuration from a file.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding of the string pointed to by aPath. (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFileW(), SIGNDOC_DocumentLoader_loadFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigFileW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const wchar_t *  aPath 
)

Load font configuration from a file.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPathThe pathname of the file.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream,
int  aEncoding,
const char *  aDirectory 
)

Load font configuration from a stream.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamThe font configuration will be read from this stream. This function reads the input completely, it doesn't stop at the end tag.
[in]aEncodingThe encoding of the string pointed to by aDirectory (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadFontConfigStreamW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream,
const wchar_t *  aDirectory 
)

Load font configuration from a stream.

Suitable fonts are required for putting text containing characters that cannot be encoded using WinAnsiEncoding into text fields, FreeText annotations, DigSig appearances, watermarks, and pages of PDF documents. See section Font Configuration.

The font configuration applies to all SIGNDOC_Document objects created by aObj.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamThe font configuration will be read from this stream. This function reads the input completely, it doesn't stop at the end tag.
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile()
int SIGNDOC_DocumentLoader_loadFromFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding,
const char *  aPath,
SIGNDOC_Boolean  aWritable,
struct SIGNDOC_Document **  aOutput 
)

Load a document from a file.

Signing the document will overwrite the document, but see string parameter "OutputPath" of SIGNDOC_SignatureParameters.

You can open FDF files that reference a PDF file; the referenced PDF file will be opened and the FDF file will be applied to the loaded copy. If the pathname of the referenced PDF file is not an absolute pathname, it will be interpreted as being relative to the directory containing the FDF file.

The file will remain open until the document is saved or the SIGNDOC_Document object is closed or destroyed.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathPathname of the document file. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aWritableOpen for writing (used for signing TIFF documents in place, ignored for PDF documents).
[out]aOutputA pointer to a new SIGNDOC_Document object representing the document will be stored into the object pointed to by this argument. The caller is responsible for destroying the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_loadFromMemory(), SIGNDOC_Document_applyFdf(), SIGNDOC_SignatureParameters_setInteger()
int SIGNDOC_DocumentLoader_loadFromFileW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const wchar_t *  aPath,
SIGNDOC_Boolean  aWritable,
struct SIGNDOC_Document **  aOutput 
)

Load a document from a file.

Signing the document will overwrite the document, but see string parameter "OutputPath" of SIGNDOC_SignatureParameters.

You can open FDF files that reference a PDF file; the referenced PDF file will be opened and the FDF file will be applied to the loaded copy. If the pathname of the referenced PDF file is not an absolute pathname, it will be interpreted as being relative to the directory containing the FDF file.

The file will remain open until the document is saved or the SIGNDOC_Document object is closed or destroyed.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPathPathname of the document file.
[in]aWritableOpen for writing (used for signing TIFF documents in place, ignored for PDF documents).
[out]aOutputA pointer to a new SIGNDOC_Document object representing the document will be stored into the object pointed to by this argument. The caller is responsible for destroying the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_loadFromMemory(), SIGNDOC_Document_applyFdf(), SIGNDOC_SignatureParameters_setInteger()
int SIGNDOC_DocumentLoader_loadFromMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aData,
size_t  aSize,
SIGNDOC_Boolean  aCopy,
struct SIGNDOC_Document **  aOutput 
)

Load a document from memory.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aDataPointer to the first octet of the document. This array of octets must live at least as long as the returned object unless aCopy is SIGNDOC_TRUE. This array of octets must not be a mapped file unless aCopy is SIGNDOC_TRUE.
[in]aCopySIGNDOC_TRUE to make a copy of the array of octets pointed to by aData.
[in]aSizeSize of the document (number of octets).
[out]aOutputA pointer to a new SIGNDOC_Document object representing the document will be stored into the object pointed to by this argument. The caller is responsible for destroying the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_loadFromFile()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize,
int  aEncoding,
const char *  aDirectory 
)

Load font configuration for rendering PDF documents from a blob.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob containing the XML document.
[in]aSizeThe number of octets pointed to by aPtr.
[in]aEncodingThe encoding of the string pointed to by aDirectory (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlobW(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigBlobW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize,
const wchar_t *  aDirectory 
)

Load font configuration for rendering PDF documents from a blob.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob containing the XML document.
[in]aSizeThe number of octets pointed to by aPtr.
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlobW(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const char *  aName 
)

Load font configuration for rendering PDF documents from files specified by an environment variable.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Under Windows, directories are separated by semicolons. Under Unix, directories are separated by colons.

See section Font Configuration.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aNameThe name of the environment variable.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding,
const char *  aPath 
)

Load font configuration for rendering PDF documents from a file.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFileW(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigFileW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const wchar_t *  aPath 
)

Load font configuration for rendering PDF documents from a file.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPathThe pathname of the file.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream,
int  aEncoding,
const char *  aDirectory 
)

Load font configuration for rendering PDF documents from a stream.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamThe font configuration will be read from this stream. This function reads the input completely, it doesn't stop at the end tag.
[in]aEncodingThe encoding of the string pointed to by aDirectory (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStreamW()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadPdfFontConfigStreamW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream,
const wchar_t *  aDirectory 
)

Load font configuration for rendering PDF documents from a stream.

Additional fonts may be required for rendering PDF documents. The font configuration for rendering PDF documents contains mappings from font names to font files. See section Font Configuration.

The font configuration for rendering PDF documents is global, ie, it affects all PDF documents, no matter by which SIGNDOC_DocumentLoader object they have been created.

Use SIGNDOC_DocumentLoader_getFailedFontFiles() after calling this function to get the pathnames of any fonts that could not be loaded.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamThe font configuration will be read from this stream. This function reads the input completely, it doesn't stop at the end tag.
[in]aDirectoryIf non-NULL, relative font pathnames will be relative to this directory. The directory must exist and must be readable. If NULL, relative font pathnames will make this function fail.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_getFailedFontFiles(), SIGNDOC_DocumentLoader_loadPdfFontConfigBlob(), SIGNDOC_DocumentLoader_loadPdfFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadPdfFontConfigFile(), SIGNDOC_DocumentLoader_loadPdfFontConfigStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
int  aEncoding,
const char *  aPath 
)

Load trusted root CA certifcates from a file.

The loaded certificates are used for all SIGNDOC_Document objects created by aObj. They are used for signature verification and HTTPS connections. For iOS, they replace the system's trusted anchors, for other operating systems, they are used in addition to the operating system's trusted root CA certificates.

The file must contain either a single DER-encoded X.509 certificate or at least one PEM-encoded X.509 certificate.

Calls to SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory(), and SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream() are cumulative.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aEncodingThe encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const wchar_t *  aPath 
)

Load trusted root CA certifcates from a file.

The loaded certificates are used for all SIGNDOC_Document objects created by aObj. They are used for signature verification and HTTPS connections. For iOS, they replace the system's trusted anchors, for other operating systems, they are used in addition to the operating system's trusted root CA certificates.

The file must contain either a single DER-encoded X.509 certificate or at least one PEM-encoded X.509 certificate.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPathThe pathname of the file.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize 
)

Load trusted root CA certifcates from a blob.

The loaded certificates are used for all SIGNDOC_Document objects created by aObj. They are used for signature verification and HTTPS connections. For iOS, they replace the system's trusted anchors, for other operating systems, they are used in addition to the operating system's trusted root CA certificates.

The blob must contain either a single DER-encoded X.509 certificate or at least one PEM-encoded X.509 certificate.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob from which the certificates will be read.
[in]aSizeThe size of the blob pointed to by aPtr.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_loadTrustedCertificatesFromStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream 
)

Load trusted root CA certifcates from a stream.

The loaded certificates are used for all SIGNDOC_Document objects created by aObj. They are used for signature verification and HTTPS connections. For iOS, they replace the system's trusted anchors, for other operating systems, they are used in addition to the operating system's trusted root CA certificates.

The stream must contain either a single DER-encoded X.509 certificate or at least one PEM-encoded X.509 certificate.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamThe certificates will be read from this stream.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFile(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromFileW(), SIGNDOC_DocumentLoader_loadTrustedCertificatesFromMemory()
struct SIGNDOC_DocumentLoader * SIGNDOC_DocumentLoader_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_DocumentLoader constructor.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
A pointer to the new SIGNDOC_DocumentLoader object.
int SIGNDOC_DocumentLoader_ping ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_InputStream aStream 
)

Determine the type of a document.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aStreamA seekable stream for the document.
Returns
The type of the document (SIGNDOC_DOCUMENT_DOCUMENTTYPE_PDF, SIGNDOC_DOCUMENT_DOCUMENTTYPE_TIFF, SIGNDOC_DOCUMENT_DOCUMENTTYPE_OTHER, SIGNDOC_DOCUMENT_DOCUMENTTYPE_FDF) or SIGNDOC_DOCUMENT_DOCUMENTTYPE_UNKNOWN on error.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_pingMemory()
int SIGNDOC_DocumentLoader_pingMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
const unsigned char *  aPtr,
size_t  aSize 
)

Determine the type of a document.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aPtrA pointer to the first octet of a blob containing the document.
[in]aSizeThe size of hte blob.
Returns
The type of the document (SIGNDOC_DOCUMENT_DOCUMENTTYPE_PDF, SIGNDOC_DOCUMENT_DOCUMENTTYPE_TIFF, SIGNDOC_DOCUMENT_DOCUMENTTYPE_OTHER, SIGNDOC_DOCUMENT_DOCUMENTTYPE_FDF) or SIGNDOC_DOCUMENT_DOCUMENTTYPE_UNKNOWN on error.
See also
SIGNDOC_DocumentLoader_getErrorMessage(), SIGNDOC_DocumentLoader_ping()
SIGNDOC_Boolean SIGNDOC_DocumentLoader_registerDocumentHandler ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
struct SIGNDOC_DocumentHandler aHandler 
)

Register a document handler.

The behavior is undefined if multiple handlers for the same document type are registered.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aHandlerAn instance of a document handler. aObj takes ownerswhip of the object, do not call SIGNDOC_DocumentHandler_delete().
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_PdfDocumentHandler_new(), SIGNDOC_TiffDocumentHandler_new()
void SIGNDOC_DocumentLoader_setFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_DocumentLoader aObj,
unsigned  aFlags 
)

Set flags modifying the behavior of this SIGNDOC_DocumentLoader object and of the SIGNDOC_Document objects created by it.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_DocumentLoader object.
[in]aFlagsThe flags: 0 or SIGNDOC_DOCUMENTLOADER_FLAGS_MAP_INTO_MEMORY.
SIGNDOC_Boolean SIGNDOC_DocumentLoader_setLicenseKey ( struct SIGNDOC_Exception **  aEx,
const void *  aKeyPtr,
size_t  aKeySize,
const char *  aProduct,
const char *  aVersion,
const void *  aTokenPtr,
size_t  aTokenSize 
)

Initialize license management with license key.

License management must be initialized before the non-static methods of SIGNDOC_DocumentLoader can be used.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aKeyPtrPointer to the first character of the license key.
[in]aKeySizeSize in octets of the license key, not including any terminating NUL character.
[in]aProductShould be NULL.
[in]aVersionShould be NULL.
[in]aTokenPtrNULL or pointer to the first octet of the token. Should be NULL.
[in]aTokenSizeSize in octets of the token. Should be 0.
Returns
SIGNDOC_TRUE if successful, SIGNDOC_FALSE on error.
See also
SIGNDOC_DocumentLoader_generateLicenseToken()

The documentation for this class was generated from the following file: