PHP API client for Juicy(fx).
composer juicyfx/juicy
State | Version | Branch | PHP |
---|---|---|---|
dev | ^0.2 |
master |
^7.2 |
stable | ^0.1 |
master |
^7.2 |
$client = JuicyFx::createPdf();
$client = JuicyFx::createPdf(['base_uri' => 'your-pdfx.now.sh']);
$response = $client->pdf()->url('https://f3l1x.io');
$response = $client->pdf()->raw('raw string');
$response = $client->pdf()->json([);
'body' => 'post body'
]);
$response = $client->pdf()->json([
'body' => 'post data',
'headerTemplate' => '<div style="font-size: 30px;">HEADER</div>',
'footerTemplate' => '<div style="font-size: 30px;">FOOTER</div>',
], [
'displayHeaderFooter' => 1,
'marginTop' => 100,
'marginBottom' => 100,
]);
All options from puppeteer (page.pdf()) are supported.
Milan Felix Šulc |