Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fawno/qpdf
PHP class for access QPDF C Interface
https://github.com/fawno/qpdf
ffi ffi-bindings pdf qpdf
Last synced: about 5 hours 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 (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T17:09:28.000Z (over 2 years ago)
- Last Synced: 2024-09-18T01:59:09.061Z (about 2 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
[![GitHub license](https://img.shields.io/github/license/fawno/QPDF)](https://github.com/fawno/QPDF/blob/master/LICENSE)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/fawno/QPDF)](https://github.com/fawno/QPDF/tags)
[![Packagist](https://img.shields.io/packagist/v/fawno/qpdf)](https://packagist.org/packages/fawno/qpdf)
[![Packagist Downloads](https://img.shields.io/packagist/dt/fawno/qpdf)](https://packagist.org/packages/fawno/qpdf/stats)
[![GitHub issues](https://img.shields.io/github/issues/fawno/QPDF)](https://github.com/fawno/QPDF/issues)
[![GitHub forks](https://img.shields.io/github/forks/fawno/QPDF)](https://github.com/fawno/QPDF/network)
[![GitHub stars](https://img.shields.io/github/stars/fawno/QPDF)](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();
}
```