ComPDFKit Conversion C++ SDK 3.0.0
API Documentation
|
Manages all operations related to the SDK library. More...
#include <library_manager.h>
Static Public Member Functions | |
static base::ErrorCode | LicenseVerify (const char *license, const char *device_id, const char *app_id) |
Verifies the provided license key along with device ID and application ID. | |
static void | Initialize (const char *resource_path) |
Initializes the SDK library with the given resource path as a C-string. | |
static void | Initialize (const wchar_t *resource_path) |
Initializes the SDK library with the given resource path as a wide-character string. | |
static void | Release () |
Releases all resources used by the library. Should be called when the SDK is no longer needed. | |
static void | SetLogger (bool enable_info, bool enable_warning) |
Enables or disables logging for info and warning messages. | |
static void | SetProgress (COMProgress progress) |
Sets a callback function to track the progress of SDK operations. | |
static void | GetVersion (char *version) |
Gets the version of the SDK library. | |
static int | GetPageCount (const char *file_path, const char *password) |
Returns the number of pages in a document. | |
static int | GetPageCount (const wchar_t *file_path, const wchar_t *password) |
Returns the number of pages in a document. | |
static base::ErrorCode | SetDocumentAIModel (const char *file_path, base::OCRLanguage language) |
Sets the Document AI model for OCR based on the provided file path and language. | |
static base::ErrorCode | SetDocumentAIModel (const wchar_t *file_path, base::OCRLanguage language) |
Sets the Document AI model for OCR based on the provided file path and language. | |
static void | SetOCRLanguage (base::OCRLanguage language) |
Sets the OCR language for document processing. | |
static void | SetOCRResult (const char *json_str) |
Sets OCR result data from a JSON string. | |
Manages all operations related to the SDK library.
The LibraryManager
class serves as a central hub for managing the lifecycle of an SDK library. It provides functionalities such as initializing the library with specified resources, verifying licenses, installing fonts, setting up logging and progress callbacks, retrieving version information, and counting pages in documents.
|
static |
Returns the number of pages in a document.
[in] | file_path | Path to the document file. |
[in] | password | Password for opening the document (if required). |
|
static |
Returns the number of pages in a document.
[in] | file_path | Path to the document file as a wide-character string. |
[in] | password | Password for opening the document (if required) as a wide-character string. |
|
static |
Gets the version of the SDK library.
[out] | version | A pre-allocated buffer where the version string will be copied. |
|
static |
Initializes the SDK library with the given resource path as a C-string.
This method should be called before any other SDK function is invoked.
[in] | resource_path | Path to the resources needed by the SDK. |
|
static |
Initializes the SDK library with the given resource path as a wide-character string.
This method should be called before any other SDK function is invoked.
[in] | resource_path | Path to the resources needed by the SDK. |
|
static |
Verifies the provided license key along with device ID and application ID.
[in] | license | The license key string to be verified. |
[in] | device_id | A unique identifier for the device. |
[in] | app_id | An identifier for the application using the SDK. |
|
static |
Releases all resources used by the library. Should be called when the SDK is no longer needed.
|
static |
Sets the Document AI model for OCR based on the provided file path and language.
[in] | file_path | Path to the Document AI model file. |
[in] | language | The language for OCR processing. |
|
static |
Sets the Document AI model for OCR based on the provided file path and language.
[in] | file_path | Path to the Document AI model file as a wide-character string. |
[in] | language | The language for OCR processing. |
|
static |
Enables or disables logging for info and warning messages.
[in] | enable_info | True if info messages should be logged; false otherwise. |
[in] | enable_warning | True if warning messages should be logged; false otherwise. |
|
static |
Sets the OCR language for document processing.
[in] | language | The language for OCR processing. |
|
static |
Sets OCR result data from a JSON string.
[in] | json_str | JSON string containing OCR results. |
|
static |
Sets a callback function to track the progress of SDK operations.
[in] | progress | A pointer to the COMProgress callback function. |