FAQ
Does OCR work on x86 architecture?
Currently, the OCR only works on x64 architecture.
PHP FFI is not enabled.
Make sure
extension=ffiandffi.enable=trueare set inphp.ini, then verify withphp -m | grep -i ffi.PHP script crashes when run directly with
php.Always start PHP scripts that call the SDK through
samples/compdfphp(orsamples/run.sh). The launcher preloads the native dependencies before PHP starts, avoiding native loading-order issues caused by lazy FFI loading.License invalid.
- Make sure
license.xmlexists in the package root. - Make sure the license platform matches the current runtime platform.
- Pass the XML file path directly to
LibraryManager::licenseVerify(). - If your license requires a device ID or application ID, pass them as the second and third parameters of
LibraryManager::licenseVerify().
- Make sure
Native library directory is not found.
Make sure
lib/linux/libcpdfconversionsdk.so,lib/linux/libDocumentAI.so.4.0.0,lib/linux/libonnxruntime.so.1.18.0,lib/linux/libopencv_world.so.410, andlib/linux/libcompdf_php_shim.soare present. If they are stored in another directory, setCOMPDFKIT_LIB_DIRbefore running the sample.