Skip to content
HALOWERK

Formatwerk

pdf stamp codes

Generates each code with bwip-js (BWIPP; check digits and data rules enforced, invalid data rejected with the encoder message) as a 600 dpi image with white quiet zone and places it with pdf-lib relative to a corner of the visible page (CropBox; /Rotate honoured so the code appears upright). Text may contain {page}, {pages} and {file}. 2D codes keep their aspect ratio, linear codes are sized to width x height. Up to 10 definitions per call.

POST https://format.halowerk.com/v1/pdf-stamp-codes

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
pdf_base64stringYes
file_labelstringNoValue for the {file} placeholder.
stampsarrayYes
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "pdf_base64",
    "stamps"
  ],
  "properties": {
    "pdf_base64": {
      "type": "string",
      "maxLength": 28000000
    },
    "file_label": {
      "type": "string",
      "maxLength": 80,
      "description": "Value for the {file} placeholder."
    },
    "stamps": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "symbology",
          "text"
        ],
        "properties": {
          "symbology": {
            "type": "string",
            "enum": [
              "qrcode",
              "datamatrix",
              "azteccode",
              "pdf417",
              "code128",
              "code39",
              "ean13",
              "ean8",
              "gs1-128",
              "interleaved2of5"
            ]
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Content; placeholders {page}, {pages}, {file}."
          },
          "pages": {
            "type": "string",
            "pattern": "^(all|first|last|\\d+(-\\d+)?(,\\d+(-\\d+)?)*)$",
            "default": "all"
          },
          "anchor": {
            "type": "string",
            "enum": [
              "top-left",
              "top-right",
              "bottom-left",
              "bottom-right"
            ],
            "default": "top-right"
          },
          "x_mm": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000,
            "default": 10
          },
          "y_mm": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000,
            "default": 10
          },
          "width_mm": {
            "type": "number",
            "minimum": 5,
            "maximum": 200,
            "default": 20
          },
          "height_mm": {
            "type": "number",
            "minimum": 3,
            "maximum": 100,
            "default": 12,
            "description": "Linear codes only."
          },
          "human_readable": {
            "type": "boolean",
            "default": true,
            "description": "Linear codes: print the text below the bars."
          }
        }
      }
    }
  }
}

Open original schema

Published input example

{
  "pdf_base64": "JVBERi0xLjcKJYGBgYEKCjUgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL1R5cGUgL09ialN0bQovTiA0Ci9GaXJzdCAyMAovTGVuZ3RoIDI1Nwo+PgpzdHJlYW0KeJzVUk1LxDAQvedXzFFPmaTZpCuloP24iLAsnpQ9hG1YCrKRtAX99840q+JBPBt45OO9SWbyRgGCBmOgAFeCgU2hoaqEfHx/DSB3/hQmIe/HYYJnYhH2cBCyict5BiXqWnxrGz/7l3gSOQgUiz8VuxSH5RgSVH3X94gOEa0hWETd0twQtgRNe+J0SWuCMxfQmSsQi1vi+gzrcgzzq3Zzie9oJq1lTZu1psz7r3f5rS7fof/KZ1sL+RCH1s8BrtobjdoqhQrX8XRN35GCn+P/LW7Nf4znXyv84TPbyyanwD2wuiz3YYpLOpLtpKv5v8Iw+rv4Rl2D3GGYcWDyAxQmjZoKZW5kc3RyZWFtCmVuZG9iagoKNiAwIG9iago8PAovU2l6ZSA3Ci9Sb290IDIgMCBSCi9JbmZvIDMgMCBSCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9UeXBlIC9YUmVmCi9MZW5ndGggMzQKL1cgWyAxIDIgMiBdCi9JbmRleCBbIDAgNyBdCj4+CnN0cmVhbQp4nBXEMQ4AIAgEsB7G3d/6fAgdiu5y2bLVduKRfAZDgAKrCmVuZHN0cmVhbQplbmRvYmoKCnN0YXJ0eHJlZgozNzUKJSVFT0Y=",
  "stamps": [
    {
      "symbology": "qrcode",
      "text": "INV-4711 {page}/{pages}",
      "anchor": "top-right",
      "x_mm": 10,
      "y_mm": 10,
      "width_mm": 20
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’