Overview
The native C/C++ SDK exposes callback hooks that allow OCR, Layout Analysis, and Table Recognition results to be supplied by a custom AI engine. The current Node.js addon exposes progress and cancellation callbacks, but does not expose these custom AI callback extension points yet.
For Node.js integrations, use the packaged DocumentAI model through setDocumentAIModel() when OCR, Layout Analysis, Table Recognition, PDF to Searchable PDF, PDF to OFD, JSON extraction, or Markdown extraction requires AI capabilities.
Notice
- Custom AI callback hooks are available in the native C/C++ SDK v4.1.0 or later.
- The Node.js SDK keeps the native callback surface intentionally small and currently supports
onProgressandisCancelledonly. - If custom AI callbacks are added to the Node.js addon later, they must be implemented with Node-API thread-safety in mind.