PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF Conversion SDK provides demos in the "samples" folder. Before running the demo, make sure PHP 7.4+ and ext-ffi are available.
samples/run.shSuccessful output is similar to:
SDK version: 4.1.0
pdf to word: 0
pdf to excel: 0
pdf to ppt: 0
pdf to csv: 0
pdf to html: 0
pdf to rtf: 0
pdf to image: 0
pdf to txt: 0
pdf to json: 0
pdf to markdown: 0
pdf to searchable pdf: 0
pdf to ofd: 0
OK: all conversion smoke tests succeededOutput files (Word, Excel, PowerPoint, etc.) will be generated in the "samples/output_files" folder.
You can also run a single PHP script through the sample launcher:
samples/compdfphp samples/version.php
samples/compdfphp samples/direct_convert_demo.phpsamples/compdfphp configures LD_LIBRARY_PATH and uses LD_PRELOAD to load the native dependencies before the PHP process starts, which avoids native loading-order issues caused by lazy FFI loading.