On this page
Guides
How to Run a Demo
ComPDFKit Conversion SDK provides a PHP extension module located in the "lib" folder, which must be loaded first:
- Navigate to the "lib" directory of ComPDFKit Conversion SDK for Linux, find the extension file "libcompdfkit-php.so", and move it to your PHP environment's extension directory. Use the following command to locate the extension directory.
sh
php-config --extension-dir
- Modify the PHP configuration file to load the "libcompdfkit-php.so" extension.
sh
// Find the configuration file.
php --ini
// Add the following configuration to the file.
extension=libcompdfkit-php.so
- Set the "lib" directory from the ComPDFKit Conversion SDK for Linux as the dynamic library search path.
sh
// Edit the environment variable.
vim ~/.bashrc
// Add the dynamic library search path.
export LD_LIBRARY_PATH=/path/lib
// Reload the configuration.
source ~/.bashrc
- In the "samples" directory of the ComPDFKit Conversion SDK for Linux, you will find sample files for various PDF features. Choose and run the functionality you require.
php PdfToWord.php
Output files (Word, Excel, PowerPoint, etc.) will be generated in the "samples/outfiles" folder.