https://github.com/fawno/qpdf
PHP class for access QPDF C Interface
https://github.com/fawno/qpdf
ffi ffi-bindings pdf qpdf
Last synced: 3 months ago
JSON representation
PHP class for access QPDF C Interface
- Host: GitHub
- URL: https://github.com/fawno/qpdf
- Owner: fawno
- License: mit
- Created: 2022-05-01T22:41:46.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T17:09:28.000Z (almost 3 years ago)
- Last Synced: 2025-01-16T00:34:15.749Z (4 months ago)
- Topics: ffi, ffi-bindings, pdf, qpdf
- Language: C
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fawno/QPDF/blob/master/LICENSE)
[](https://github.com/fawno/QPDF/tags)
[](https://packagist.org/packages/fawno/qpdf)
[](https://packagist.org/packages/fawno/qpdf/stats)
[](https://github.com/fawno/QPDF/issues)
[](https://github.com/fawno/QPDF/network)
[](https://github.com/fawno/QPDF/stargazers)# QPDF
PHP class for access QPDF C Interface
## Requirements
The [QPDF](https://github.com/qpdf/qpdf) libary (dll or so).## Instalation
```sh
php composer.phar require "fawno/qpdf"
``````php
readFile($filename, $password);
if ($qpdf->hasError()) {
$error = $qpdf->getError();
print_r($error);
die();
}if ($qpdf->hasWarning()) {
$warning = $qpdf->getWarning();
print_r($warning);
}$filename = __DIR__ . '/document_without_encrypt.pdf';
$qpdf->initWrite($filename);
if ($qpdf->hasError()) {
$error = $qpdf->getError();
print_r($error);
die();
}$qpdf->preserveEncryption(false);
$qpdf->write();
if ($qpdf->hasError()) {
$error = $qpdf->getError();
print_r($error);
die();
}
```