Pixel-level control
x/y in millimetres, x_anchor for right-edge alignment, sub-millimetre placement on labels. Coordinates, not approximations.
// inside elements[i]
"x_anchor": {
"reference": "content_right",
"offset": 6
} Real document semantics, not browser screenshots in a PDF wrapper.
x/y in millimetres, x_anchor for right-edge alignment, sub-millimetre placement on labels. Coordinates, not approximations.
// inside elements[i]
"x_anchor": {
"reference": "content_right",
"offset": 6
} 30+ symbologies incl. Code 128, QR, DataMatrix, PDF417, GS1-128. All vector. Overall barcode length accurate to 0.1 mm.
// 30+ formats: code128, qrcode, datamatrix, pdf417, ...
"type": "barcode",
"format": "code128",
"content": "INV-2026-001" Why vector beats raster font_mode: strict (declared family must cover all glyphs), prefer (fall through bundled families), auto (engine picks). Auto/prefer exhaustion returns API-504 — fail-loud, not silent.
// inside style{}
"font_family": "NotoSans-Regular",
"font_mode": "prefer" settings.profile = "pdfa-3b" triggers PDF/A-3b compliance plus the embedded XML attachment stream that Factur-X / ZUGFeRD require. One field, one compliant document.
// top-level on DocumentRequest
"settings": {
"profile": "pdfa-3b"
} PDF/A and Factur-X, explained {page} / {total_pages} resolved post-layout. keep_together, widow/orphan, page_break blocks.
// element of type "variable"
{ "type": "variable",
"name": "page",
"scope": "system" } row_span across pages, repeat headers, alternate_fill, compound double borders. The 1% that always breaks.
// inside table element
"pagination": {
"keep_spans_together": true
} The same DocumentRequest JSON drives POST /api/v1/pdf/render and the visual editor at editor.gpdf.com. Edit visually, ship via API, or hand-craft — all three round-trip the same file.
// three routes, one engine
POST /api/v1/pdf/render
POST /api/v1/template-render
POST /api/v1/e-invoice/render Read the API reference $0.00005 per page, p50 3 ms, embedded CJK, PDF/A-3 attachment stream. The four numbers fintech, ERP and tax-compliance teams check first.
// invoice — header + table pattern
{ "size": "a4",
"elements": [
{ "type": "text", "x": 18, "y": 22, ... },
{ "type": "table", "x": 18, "y": 60, ... }
]} Why JSON beats HTML→PDF label_100_150 and label_4_6_in size presets. Vector GS1-128, ITF-14, SSCC at 0.1 mm precision — carriers and 3PLs print at peak without rasterised barcodes.
// 4×6 thermal shipping label
{ "size": "label_4_6_in",
"elements": [{
"type": "barcode",
"format": "code128",
"content": "1Z999AA10123456784" }]} Shipping-label use case