Skip to main content

How render PNG instead of PDF

How to do it

To generate the same layout but as a .PNG instead of a .PDF file, you can use the same endpoints /v1/pdf/sync and /v1/pdf/async, but passing an extra parameter convertToImage:true on the body payload. If you want to generate the image synchronously, you can use this guide: Generate PDF from Template Synchronously Or if you want to generate the image asynchronously, you can use this guide: Generate PDF from Template Asynchronously Here’s a request example for a synchronous render:
curl --location 'https://api.pdfnoodle.com/v1/pdf/sync' \
--header 'Authorization: Bearer pdfnoodle_api_123456789' \
--header 'Content-Type: application/json' \
--data '{
    "templateId": "check",
    "convertToImage": true,
    "data":{
            "currentDDate": "01/12/2025",
            "user": {
                    "name":"John Doe",
                    "email": "[email protected]"
            },
            "details": [{"score":"100", "description":"high score"}]
    }
}
'
The result will be the same signedUrl described on the guides, but with a .PNG file instead.