pdforge
API Reference
API Reference
  • Getting started
    • Overview
    • Authentication
    • Rate limit
  • PDFs from templates
    • Asynchronous request
    • Synchronous request
  • Html to pdf conversion
    • Asynchronous request
    • Synchronous request
  • OPTIONS
    • How render PNG instead of PDF
    • Storage Options (s3)
    • PDF Params
Powered by GitBook
On this page
  1. OPTIONS

How render PNG instead of PDF

Sometimes, you want to share a report on slack or through whatsapp, so you'd prefer to generate a PNG report instead of PDF. Here's how to do it!

PreviousSynchronous requestNextStorage Options (s3)

Last updated 4 months ago

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:

Or if you want to generate the image asynchronously, you can use this guide:

Here's a request example for a synchronous render:

curl --location 'https://api.pdforge.com/v1/pdf/sync' \
--header 'Authorization: Bearer pdforge_api_123456789' \
--header 'Content-Type: application/json' \
--data '{
    "templateId": "check",
    "convertToImage": true,
    "data":{
            "currentDDate": "01/12/2025",
            "user": {
                    "name":"John Doe",
                    "email": "john.doe@email.com"
            },
            "details": [{"score":"100", "description":"high score"}]
    }
}
'

The result will be the same signedUrl described on the guides, but with a .PNG file instead.

Synchronous request
Asynchronous request