Link Search Menu Expand Document

How to convert HTML to a 4in x 6in PDF

To generate a PDF output from HTML with a size of 4in x 6in, you can control the output page size using the paperSize parameter. Set the value of paperSize to 384px 576px. Here is a sample HTTP request for generating the PDF output:

POST /v1/pdf/convert/from/html HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Content-Length: 250

    "html": "<h1>Hello World!</h1><a href=''>Go to</a>",
    "name": "newDocument.pdf",
    "mediaType": "print",
    "margins": "0",
    "paperSize": "384px 576px",
    "orientation": "Portrait",
    "printBackground": false


You can also set the Page Size Override field to 384px 576px in the HTML to PDF Converter action in Zapier.


Or select Custom under Paper Size in the Convert HTML to PDF module in Integromat/Make and enter 384px 576px in the Size field.