Skip to guide

Generate PDF documents from your visual templates.

Keep a certificate, cover or branded document in a reusable design. Send its changing values through the API, then download one page or combine completed PDF jobs into one document.

Use PDF for a fixed visual layout.

The renderer places a rasterized image of the canvas on the PDF page. Your saved layout controls the result, including text, logos and images. This works for designed certificates, covers and documents whose visual arrangement should stay fixed.

The PDF does not create editable or searchable text, fillable fields or a document that reflows paragraphs across pages. If your process requires those features, evaluate a document renderer that supports them before choosing this workflow.

For a single page, select its slide explicitly. A request that renders several slides returns a ZIP of separate files, including for PDF output. To obtain one combined PDF, generate individual PDF jobs and merge them as shown below.

Generate one page and keep its job ID.

Save your template, name the changing text layer title and get its real template ID and an API key from the same account. Save this example as page.json and replace YOUR_TEMPLATE_ID. slidePosition is one-based: 1 selects the first slide.

{
  "templateId": "YOUR_TEMPLATE_ID",
  "exportFormat": "pdf",
  "mode": "deferred",
  "slidePosition": 1,
  "pageFormat": "a4",
  "layers": {
    "title": {
      "text": "Your document title"
    }
  }
}

This example uses A4. The renderer fits the canvas proportionally within the page and chooses orientation from the canvas dimensions. Preview your real design to check margins and effective image size.

curl --fail-with-body --request POST "https://api.pikstrapi.com/api/v1/templates/generate-image" \
  --header "x-api-key: $PIKSTRAPI_API_KEY" \
  --header "Content-Type: application/json" \
  --data @page.json

The commands use POSIX shell syntax and an environment variable for the API key. On Windows, use curl.exe and adapt variable and line-continuation syntax, or use the playground’s generated example. If YOUR_API_BASE_URL appears, replace it with the endpoint base from your playground, including /api/v1. Deferred generation returns HTTP 200 with jobId, status, progress and fileId. Store jobId as the identifier for this page.

For a template’s second page, submit another request with slidePosition: 2 and keep that jobId separately. To generate different documents from the same slide, keep slidePosition unchanged and replace the layer data instead.

If you need only one PDF immediately, set mode to immediate. The endpoint then returns PDF bytes with application/pdf; save them as a file rather than parsing JSON. Use deferred jobs when you need the completed job IDs for merging.

Wait until every page is completed.

Query the job with the same account’s API key. Replace YOUR_JOB_ID with the jobId from its render response. Check status, not just progress, before adding the job to the merge request.

curl --fail-with-body "https://api.pikstrapi.com/api/v1/render-jobs/YOUR_JOB_ID" \
  --header "x-api-key: $PIKSTRAPI_API_KEY"

Queued and processing jobs are not ready. A completed job must have a fileId and a PDF output. Handle failed or canceled pages separately. After a network timeout, inspect the existing job before submitting another render.

For a recurring workflow, a render.completed webhook can start the next step. Keep the page order in your own workflow data; completion order can differ from document order.

Combine PDFs in the order you specify.

Save this body as merge.json. Replace both placeholders with distinct UUID job IDs for completed PDF renders owned by your account. renderIds means render job IDs, not file IDs, template IDs or download URLs.

{
  "renderIds": [
    "YOUR_FIRST_COMPLETED_PDF_JOB_ID",
    "YOUR_SECOND_COMPLETED_PDF_JOB_ID"
  ]
}
curl --fail-with-body --request POST "https://api.pikstrapi.com/api/v1/render-jobs/merge-pdf" \
  --header "x-api-key: $PIKSTRAPI_API_KEY" \
  --header "Content-Type: application/json" \
  --data @merge.json \
  --output combined.pdf

A successful response is HTTP 200 with application/pdf. The command saves those bytes to combined.pdf. The merge preserves each input’s pages and page sizes, in the order of renderIds. It does not create another render job or consume additional render credits; generating the input PDFs uses normal rendering credits.

Check the inputs before merging.

  • Submit between 2 and 20 distinct completed PDF job IDs from the same account.
  • The combined input size and the output PDF are each limited to 20 MiB. The output is limited to 200 pages.
  • ZIP outputs, image jobs, arbitrary uploaded PDF files and external URLs are not accepted by this endpoint.
  • A job that is still rendering prevents the merge. Invalid or encrypted PDF input is rejected; read the error before retrying.

Review the document at its intended size.

Open combined.pdf in a PDF viewer and inspect page count, order, long text, accented characters and image quality. For printed documents, test the actual paper size. Confirm these details with two sample pages before connecting your live source data.

Try your PDF template in the playground

API examples checked against the Pikstrapi rendering and PDF merge contract on 9 October 2026. Replace placeholders and validate the resulting files in your own account.