Skip to main content
POST
/
pdf
/
render
Generate a PDF
curl --request POST \
  --url https://api.pictify.io/pdf/render \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "templateUid": "<string>",
  "variables": {},
  "options": {
    "preset": "A4",
    "customSize": {
      "width": 123,
      "height": 123
    },
    "margins": {
      "top": 123,
      "bottom": 123,
      "left": 123,
      "right": 123
    },
    "title": "<string>"
  }
}
'
{
  "success": true,
  "url": "<string>",
  "userStorageUrl": "<string>",
  "pageCount": 123,
  "preset": "<string>",
  "pageSize": {
    "width": 123,
    "height": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pictify.io/llms.txt

Use this file to discover all available pages before exploring further.

PDF Generation

Generate PDFs from templates with support for multiple pages, standard paper sizes, and custom dimensions.

Endpoints

MethodEndpointDescription
POST/pdf/renderRender PDF from a template
POST/pdf/multi-pageMulti-page PDF with different content per page
GET/pdf/presetsList presets for paper sizes

Paper Size Presets

PresetDimensionsDescription
A4210 x 297 mmISO standard, most common worldwide
Letter8.5 x 11 inUS standard letter size
Legal8.5 x 14 inUS legal size
A3297 x 420 mmLarge format
A5148 x 210 mmCompact size, booklets
customUser-definedSpecify with customSize

Key Options

ParameterTypeDefaultDescription
presetstringA4Paper size preset
landscapebooleanfalseLandscape orientation
marginsobject-Page margins (top, bottom, left, right) in pixels
customSizeobject-Custom dimensions when preset is custom
printBackgroundbooleantrueInclude CSS backgrounds
scalenumber1Scale factor (0.1-2.0)
The userStorageUrl response field is only included if you have configured custom storage.

Best Practices

  1. Design for print — use CMYK-friendly colors and sufficient margins
  2. Test at scale — preview PDFs at 100% zoom before production
  3. Optimize images — use appropriate resolution (150-300 DPI for print)
  4. Consider page breaks — design templates with natural page breaks for multi-page docs
  5. Use web-safe fonts — or embed custom fonts in your template

Authorizations

Authorization
string
header
required

API key obtained from the Pictify dashboard

Body

application/json
templateUid
string
required

Template UID

variables
object
options
object

Response

200 - application/json

PDF generated

success
boolean
url
string<uri>
userStorageUrl
string<uri>
pageCount
integer
preset
string
pageSize
object