ComPDF Objective-C SDK
API Reference Documentation for ComPDF Objective-C SDK
Loading...
Searching...
No Matches
LibraryManager Class Reference

Global initializer and utilities for the SDK. More...

#include <common.h>

Inheritance diagram for LibraryManager:

Class Methods

(void) + initialize:
 Initialize SDK resources.
(ErrorCode) + licenseVerify:
 Verify license.
(void) + setProgress:isMT:
 Set a progress callback.
(int) + setDocumentAIModel:ocrLanguages:
 Load Document AI model and set OCR languages.
(void) + setOCRLanguage:
 Set default OCR languages for OCR-related tasks.
(int) + getPageCount:password:
 Get page count of a PDF file.
(NSString *) + getVersion
 Get SDK version string.
(void) + release
 Release all SDK resources.
(void) + releaseDocumentAIModel
 Release loaded Document AI model.

Detailed Description

Global initializer and utilities for the SDK.

Definition at line 17 of file common.h.

Method Documentation

◆ getPageCount:password:

+ (int) getPageCount: (NSString *) filePath
password: (NSString *) password 

Get page count of a PDF file.

Parameters
filePathPDF file path.
passwordPDF open password if needed.
Returns
Number of pages (>=0); negative value indicates error.

◆ getVersion

+ (NSString *) getVersion

Get SDK version string.

Returns
Version, e.g. "1.2.3".

References getVersion.

Referenced by getVersion.

◆ initialize:

+ (void) initialize: (NSString *) resourcePath

Initialize SDK resources.

Parameters
resourcePathPath to resource directory (models, configs, etc.).

◆ licenseVerify:

+ (ErrorCode) licenseVerify: (NSString *) license

Verify license.

Parameters
licenseOnline XML path (verified online) or offline license string.
Returns
ErrorCodeSuccess on success; mapped license error codes on failure.
Note
Online verification uses a timeout (e.g., ~10s) and maps network issues to IO error.

◆ release

+ (void) release

Release all SDK resources.

References release.

Referenced by release.

◆ releaseDocumentAIModel

+ (void) releaseDocumentAIModel

Release loaded Document AI model.

References releaseDocumentAIModel.

Referenced by releaseDocumentAIModel.

◆ setDocumentAIModel:ocrLanguages:

+ (int) setDocumentAIModel: (NSString *) modelPath
ocrLanguages: (NSArray< NSNumber * > *) languages 

Load Document AI model and set OCR languages.

Parameters
modelPathModel root path.
languagesArray of OCRLanguage wrapped in NSNumber.
Returns
ErrorCode value (0 for success).

◆ setOCRLanguage:

+ (void) setOCRLanguage: (NSArray< NSNumber * > *) languages

Set default OCR languages for OCR-related tasks.

Parameters
languagesArray of OCRLanguage wrapped in NSNumber.

◆ setProgress:isMT:

+ (void) setProgress: (COMProgressBlock) handler
isMT: (BOOL) isMT 

Set a progress callback.

Parameters
handlerProgress block called during conversion.
isMTIf YES, callback is dispatched onto main thread; if NO, called directly.

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