armonia-tech / armonia-pdf
Wrapper for 3rd party pdf renderer
Installs: 4 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- dompdf/dompdf: 0.8.5
- phenx/php-font-lib: 0.5.2
This package is auto-updated.
Last update: 2024-11-16 08:40:41 UTC
README
A library to convert html to pdf
Add to Project
In your project's directory run in cli:
composer require armonia-tech/armonia-pdf:dev-master
Development
Go up 1 level from your project's directory, run in cli:
git clone https://github.com/armonia-tech/armonia-pdf.git
In your project's composer.json, add the following:
"repositories": [ { "type": "path", "url": "../armonia-pdf" } ]
then run in cli:
composer require armonia-tech/armonia-pdf:dev-master
Usage
Basic:
use ArmoniaPDF\PDF; $dompdf = new PDF; $dompdf->setPaper('A4', 'portrait'); $dompdf->loadHtml('<div>Hello</div>'); $dompdf->stream('download.pdf');