Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Initialize Library Resources

Overview

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

Notes

  • You must 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 resource under resource/models/documentai.model is available.

Example

php
use ComPDFKit\Conversion\LibraryManager;

// Initialize SDK resources. The path should be the package root that contains
// the "resource" directory (which holds the DocumentAI model).
LibraryManager::initialize('ComPDF_Conversion_Linux_php_4_1_0');