ComPDFKitConversion.LibraryManager
- class ComPDFKitConversion.LibraryManager
Bases:
pybind11_object
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 get_page_count(file_path: str, password: str) int
Returns the number of pages in a document.
- static get_version(version: str) None
Gets the version of the SDK library.
- static initialize(resource_path: str) None
Initializes the SDK library with the given resource path
- static license_verify(license: str, device_id: str, app_id: str) ComPDFKitConversion.ErrorCode
Verifies the provided license key along with device ID and application ID.
- static release() None
Releases all resources used by the library. Should be called when the SDK is no longer needed.
- static set_document_ai_model(file_path: str, language: ComPDFKitConversion.OCRLanguage) ComPDFKitConversion.ErrorCode
Sets the Document AI model for OCR based on the provided file path and language.
- static set_logger(enable_info: bool, enable_warning: bool) None
Enables or disables logging for info and warning messages.
- static set_ocr_language(language: ComPDFKitConversion.OCRLanguage) None
Sets the OCR language for document processing.
- static set_progress(progress: function) None
Sets a callback function to track the progress of SDK operations.