Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Set DocumentAI Model ​

Overview ​

Before using OCR, Layout Analysis, Table Recognition you need to set the DocumentAI model path first.

setAIModel supports an optional gpu_id parameter used to specify the GPU device index for the AI model. When gpu_id is -1, GPU acceleration is disabled.

Set AI Model Instance Count ​

If you need to control the number of Layout Analysis and Table Recognition model instances, call the corresponding interface to set the model instance counts.

Sample ​

kotlin
ConverterManager.setAIModel("<model_path>")