Skip to content
ComPDF

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');