Download the PHP package raudius/phpdf without Composer
On this page you can find all versions of the php package raudius/phpdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raudius/phpdf
More information about raudius/phpdf
Files in raudius/phpdf
Informations about the package phpdf
A mediocre library for modifying PDF files.
❗ Important ❗
Be warned that this library is not production ready!
- QPDF dependant
To use this library you need to have qpdf installed on your system. - Performance
Although some attention has been put to simple optimisations, this library is far from optimal particularly in terms of memory consumption. Additionally, it relies heavily on repeated read/writes to temp files. - Compatibility
I am only testing this library on Linux with qpdf >=v9.1.1. - Security
This library directly interfaces with the shell. Do NOT pass along user-defined values to any function on this library.
📖 How it works
Loading PDFs
There are multiple ways to get a PDF file going, the simplest is to create a stub file (an empty PDF file ready to receive data):
You can also load directly from an existing PDF. In this method you can specify whether you want operations performed on the pdf to overwrite the existing file (false by default).
You can also create a PDF directly from a raw PDF string, this is the least advisable method as it requires loading the entire file into memory:
PDF operations
You can perform different operations on your Phpdf
objects. You can specify the pdf object in the execution argument to apply the changes directly to that file.
For more detailed information on each operation you can read their corresponding PHPdoc.
Save PDF
Unless you specified to overwrite an input file you will need to save your resulting PDF manually:
🔓 License
There is no license attached to this code, because I have no desire to claim ownership of it. If you wish to use this against your better judgement and require a license, you may use it under any fully permissive license (Beerware, WTFPL, CC0...)