Download the PHP package asyncphp/paper without Composer
On this page you can find all versions of the php package asyncphp/paper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asyncphp/paper
More information about asyncphp/paper
Files in asyncphp/paper
Package paper
Short Description Hassle-free HTML to PDF conversion abstraction library
License MIT
Informations about the package paper
Paper
Hassle-free HTML to PDF conversion abstraction library.
Installation
For best results, you should also install Prince and WKHTMLtoDPF. To run the tests, you'll also need to install diff-pdf. If you don't have the latter installed, you'll not be able to run the tests. If you don't have the former installed, the relevant tests will be skipped, and drivers unusable.
Usage
You can use any of the drivers directly:
However, it's must easier to use the factory, to create pre-configured drivers:
Paper takes an async-first approach. Operations, like rendering PDF files, are particularly suited to parallel processing architecture. You may be stuck rending PDF files in a synchronous architecture, in which case you can use the SyncDriver
decorator:
Drivers
Here's a list of the drivers to currently support:
DOMPDF
- Requires command-line utilities: no
- Supports modern CSS: no
- Supports modern JS: no
- Produces vector files: yes
- Open + free: yes
WKHTMLtoDPF
- Requires command-line utilities: yes
- Supports modern CSS: yes
- Supports modern JS: yes
- Produces vector files: yes
- Open + free: yes
Prince
- Requires command-line utilities: yes
- Supports modern CSS: yes
- Supports modern JS: yes
- Produces vector files: yes
- Open + free: no
Runners
Paper supports Amp and React, to package and run the async code. You have to install one of the following library groups:
Amp
React
Take a look at the examples folder to find out more about using the async drivers.
Roadmap
- Setters for default margin
- Setters for header HTML
- Setters for footer HTML
- More drivers (especially DocRaptor – a SaaS version of Prince)
Versioning
This library follows Semver. According to Semver, you will be able to upgrade to any minor or patch version of this library without any breaking changes to the public API. Semver also requires that we clearly define the public API for this library.
All methods, with public
visibility, are part of the public API. All other methods are not part of the public API. Where possible, we'll try to keep protected
methods backwards-compatible in minor/patch versions, but if you're overriding methods then please test your work before upgrading.