PDF API

Learn here how to use our API to fill a previously created document OpenDocument and create a PDF from it. All you need is a free PDFTemplate account (register now).

 

API Endpoint

https://api.pdftemplate.eu/v3/job

 

JSON Request Parameter

{
  "key": "abcdefg1234567890",
  "template": {
    "extension": "odt",
    "base64": "--- Base64 encoded template file ---"
  },
  "vars": {
    "demo_var_1": "Demo value for var 1",
    "demo_var_2": "Demo value for var 2",
    "demo_image": {
      "type": "image",
      "extension": "jpg",
      "base64": "--- Base64 encoded image file ---"
    },
    "demo_qr_code": {
      "type": "qr",
      "text": "This ist the content of the QR Code",
      "size": "50",
      "label": "Demo Label"
    },
    "demo_repetition": [
      {
        "repetition_field_1": "Demo value for 1. repetition field 1",
        "repetition_field_2": "Demo value for 1. repetition field 2",
        "repetition_field_3": "Demo value for 1. repetition field 3",
      },
      {
        "repetition_field_1": "Demo value for 2. repetition field 1",
        "repetition_field_2": "Demo value for 2. repetition field 2",
        "repetition_field_3": "Demo value for 2. repetition field 3",
      }
    ]
  }
}

 

JSON Response

{
  "job": "ID of the Job",
  "status": 200, // HTML status code
  "base64": "--- Base64 encoded PDF file ---"
}