BizKitHub
DokumentationAPI-ExplorerDisk/api/v1/disk/store-pdf
postDiskÖffentliche API v1

/api/v1/disk/store-pdf

Generates a PDF from provided HTML using the BizKitHub PDF generator parameters, stores it in blob storage, and returns a public download URL.

Sizing priority: width overrides format. Optional height makes page size explicit. autoHeight enables print-safe margins; margin overrides them. fitHeight enables single-page receipt mode.

diskdiskStorePdf

Parameter

JSON-Body

Request-Body

application/json
htmlContentstringPflicht

HTML content to render into PDF. This is sent as the generator request body (compressed).

Beispiel<!doctype html><html><body><h1>Invoice #123</h1></body></html>
filenamestringPflicht

Original filename. The service normalizes it, appends a random suffix, and forces the .pdf extension.

Beispielinvoice-123.pdf
tagstringOptional

Optional storage tag (internal metadata label).

Beispieleinvoicecontractreport
formatstringOptional

Standard paper format (e.g. A4, Letter, …). Used when width is not set. Default is A4.

BeispieleA4Letter
widthstringOptional

Custom page width (CSS length, e.g. 80mm, 210mm, 800px). When set, it overrides format.

Beispiele80mm210mm800px
heightstringOptional

Custom page height (CSS length). Used in fixed-size mode. When width is set and fitHeight is not enabled, height defaults like A4 height behavior.

Beispiele150mm297mm
autoHeightbooleanOptional

Enables print-safe margins consistently across pages (improves page breaks and prevents edge clipping).

Beispieltrue
marginstringOptional

Overrides margin size when autoHeight=true. CSS shorthand (1–4 values), e.g. "12mm 10mm" or "2mm".

Beispiele12mm 10mm2mm
fitHeightbooleanOptional

Receipt mode: generates a single-page PDF whose height is derived from rendered content. Works best with width (e.g. 80mm).

Beispieltrue
uuidstringOptional

Optional identifier stored in PDF metadata keywords.

Beispieleorder_123invoice_2026_0001
authorstringOptional

Optional author label in PDF metadata (Author/Creator/Producer). If omitted, defaults to organisation name.

BeispieleBizKitHubJan Barášek
debugbooleanOptional

Adds debug CSS borders to the rendered HTML for layout inspection (internal).

Beispieltrue

Antwortschema

1 dokumentierter Statuscode

200Erfolg
successbooleanPflicht
Beispieltrue
downloadUrlstringPflicht

Resolvable public URL for downloading the stored PDF.

Beispielhttps://storage.xhp.cz/...
tokenstringPflicht

Blob access token (storage-level).

Beispielabc123...
blobPathstringPflicht

Internal blob path inside storage. The storage layer always injects a 16-char random suffix before the extension for non-enumerability.

Beispielpdf/2026-01/invoice-123_R4nd0mStr1ngHere.pdf
sizenumberPflicht

Stored PDF size in bytes.

Beispiel153042

Antwortbeispiel

application/json
{
  "success": true,
  "downloadUrl": "https://storage.xhp.cz/...",
  "token": "abc123...",
  "blobPath": "pdf/2026-01/invoice-123_R4nd0mStr1ngHere.pdf",
  "size": 153042
}

Anfragebeispiel

POST /api/v1/disk/store-pdf

post
curl -X POST "https://api.bizkithub.com/api/v1/disk/store-pdf" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "htmlContent": "<!doctype html><html><body><h1>Invoice #123</h1></body></html>",
  "filename": "invoice-123.pdf",
  "tag": "invoice",
  "format": "A4",
  "width": "80mm",
  "height": "150mm",
  "autoHeight": true,
  "margin": "12mm 10mm",
  "fitHeight": true,
  "uuid": "order_123",
  "author": "BizKitHub",
  "debug": true
}'

Sie brauchen einen API-Schlüssel?

Alle öffentlichen Endpunkte der BizKitHub-API authentifizieren per API-Schlüssel.

API-Schlüssel erhalten