appoly / document-generator
A package to generate pdfs and pngs from urls or html sent to a lambda function
Installs: 689
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/appoly/document-generator
Requires
- guzzlehttp/guzzle: ^7.3
- illuminate/support: *
README
This package will generate PDFs and PNGs from websites.
Installation
composer require appoly/document-generator
Usage
use Appoly\DocumentGenerator\Facades\DocumentGenerator; $png = DocumentGenerator::url('https://www.appoly.co.uk') ->png() ->get();
Options
| Option | Description | 
|---|---|
| ->pdf() | sets the file to .pdf | 
| ->png() | sets the file to .png | 
| ->url($url) | sets the url that will be rendered | 
| ->html($html) | sets the html that will be rendered | 
| ->height($h) | sets the files height | 
| ->width($w) | sets the files width | 
| ->showBackground($i = true) | when rendering a PDF, Set to trueto print background graphics | 
| ->filename($name) | sets the file name - defaults to random.filetype | 
API Key
A api key is required. This can be defined in your .env
DOCUMENT_GENERATOR_API_KEY