public class LibraryManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
getPageCount(java.lang.String filePath,
java.lang.String password)
Retrieves the number of pages in a PDF document.
|
static java.lang.String |
getVersion()
Returns the current version of the SDK library.
|
static void |
initialize(java.lang.String resourcePath)
Initializes the SDK library.
|
static ErrorCode |
licenseVerify(java.lang.String license,
java.lang.String deviceID,
java.lang.String appID)
Checks the validity of the license.
|
static void |
release()
Releases and cleans up SDK resources.
|
static int |
setDocumentAIModel(java.lang.String modelPath,
OCRLanguage language)
Configures the Document AI model used for OCR.
|
static void |
setLogger(boolean enableInfo,
boolean enableWarning)
Enables or disables SDK logging output.
|
static void |
setOCRLanguage(OCRLanguage language)
Sets the OCR language used by the SDK.
|
static void |
setProgress(ProgressCallback callback)
Sets a callback to monitor progress during SDK operations.
|
public static void initialize(java.lang.String resourcePath)
resourcePath
- The path to the SDK resource directory.public static ErrorCode licenseVerify(java.lang.String license, java.lang.String deviceID, java.lang.String appID)
license
- The license string.deviceID
- The unique device identifier.appID
- The application identifier.ErrorCode
indicating the result of the permission check.public static void release()
public static java.lang.String getVersion()
public static void setOCRLanguage(OCRLanguage language)
language
- The OCRLanguage
to use for OCR operations.public static int setDocumentAIModel(java.lang.String modelPath, OCRLanguage language)
modelPath
- The file path to the AI model.language
- The language used by the model.public static void setProgress(ProgressCallback callback)
callback
- An implementation of ProgressCallback
that receives progress updates.public static int getPageCount(java.lang.String filePath, java.lang.String password)
filePath
- The path to the PDF file.password
- The password for the document, or an empty string if not protected.public static void setLogger(boolean enableInfo, boolean enableWarning)
enableInfo
- Whether to enable informational logs.enableWarning
- Whether to enable warning logs.