Skip to content
ComPDF

Initialize Library Resources

Overview

Initialize the necessary file and memory resources required by the ComPDF Conversion SDK.

The Node.js SDK initializes with its packaged internal resource directory when initialize() is called without arguments. You can still pass a custom resource path when needed.

Notes

  • You must verify the license and initialize SDK resources before calling any conversion interface.
  • When using OCR, Layout Analysis, Table Recognition, PDF to Searchable PDF, or PDF to OFD, make sure the DocumentAI model is available and loaded when the feature requires it.
  • Call release() after conversions complete so native SDK resources are freed.

Example

js
sdk.initialize();

// Or use an external resource directory.
sdk.initialize("/path/to/resource");