PHP code example of machinateur / php-qpdf-ffi
1. Go to this page and download the library: Download machinateur/php-qpdf-ffi library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
machinateur / php-qpdf-ffi example snippets
\define('LIB_QPDF_PATH', '/path/to/your/qpdf');
ts(__DIR__ . '/example.json')
);
switch ($result)
{
case \qpdf_exit_code_e::QPDF_EXIT_SUCCESS:
echo 'Success';
return;
case \qpdf_exit_code_e::QPDF_EXIT_WARNING:
case \qpdf_exit_code_e::QPDF_EXIT_IS_NOT_ENCRYPTED:
echo 'Warning / IS_NOT_ENCRYPTED';
return;
case \qpdf_exit_code_e::QPDF_EXIT_ERROR:
case \qpdf_exit_code_e::QPDF_EXIT_CORRECT_PASSWORD:
echo 'Error / CORRECT_PASSWORD';
return;
}
bash
composer