#Browser rendering /pdf endpoint. How to specify A4 format and margins?

2 messages · Page 1 of 1 (latest)

rich cape
#

I'm using this https://developers.cloudflare.com/browser-rendering/rest-api/pdf-endpoint/ via the TypeScript SDK.

With Puppeteer you can specify
formats and margins, but it doesn't seem that these parameters are exposed.

It doesn't seem possible to print an A4 (for invoices, receipts, etc).

Is there a workaround? If not, any plans to support them?

Thanks!

Cloudflare Docs

The /pdf endpoint instructs the browser to render the webpage as a PDF document.

carmine night