bizkithub-pdf-api.pdf
–/ 6
HTML → PDF · one endpoint

HTML in.
Print-ready PDF out.

Send markup, get a document: invoices, contracts, receipts and reports rendered by Chromium with print-safe margins, any paper size and machine-readable attachments.

Endpoint
One, POST or GET
Paper
A4, Letter, any mm
Margins
Zero or print-safe
Embeds
ISDOC, XML, JSON
BizKitHub PDF · API reference01 · Endpoint
§ 1

One URL. Everything else is a query parameter.

POST https://pdf.bizkithub.com/generator

Send the HTML as the request body (text/html or plain text) and get application/pdf back. Query parameters control paper size, margins and receipt mode. Switch to multipart/form-data when you want to embed files, see § 6 Attachments.

Chromium

Real browser engine: modern CSS, web fonts, flexbox and grid.

Paged media

Clean page breaks with consistent per-page margins.

Hybrid files

PDF for people, embedded ISDOC/XML for software.

pdf.bizkithub.com/#endpointPage 1 of 6
BizKitHub PDF · API reference02 · Try it
§ 2

Try it on the real endpoint

Edit the sample, pick a layout and the PDF opens in a new tab, rendered by the same service your integration calls.

Layout
POST /generator?autoHeight=true
pdf.bizkithub.com/#tryPage 2 of 6
BizKitHub PDF · API reference03 · Parameters
§ 3

Query parameters

Every parameter has a safe default. Send only what you need.

ParameterTypeBehaviour
contentstringHTML to render. Usually sent as the POST body; for GET requests use ?content=.
formatstringStandard paper format (A4, Letter, …). Used when width is not set. Default A4.
widthCSS lengthCustom page width (80mm, 210mm, 800px). Overrides format.
heightCSS lengthCustom page height, fixed-size mode only. With width set and no fitHeight, defaults to A4 height (297mm).
autoHeightbooleanSwitches from zero margins to print-safe margins on every page. Cleaner page breaks, nothing cut off.
marginCSS shorthandMargin override when autoHeight=true. 1 to 4 values, e.g. 12mm 10mm.
fitHeightbooleanReceipt mode: a single page as tall as the content. Pair with width (e.g. 80mm).
uuidstringOptional identifier, stored in PDF metadata keywords.
authorstringOptional author for PDF metadata (Author / Creator / Producer).
pdf.bizkithub.com/#parametersPage 3 of 6
BizKitHub PDF · API reference04 · Rules
§ 4

Three rules decide every output

  1. 1

    Paper size priority

    width wins over format. Add height and the size is fully explicit. With only width (and no fitHeight) the page height defaults to A4.

  2. 2

    autoHeight controls margins

    Default is zero margins. autoHeight=true applies print-safe margins on every page (A4-style for standard paper, tighter for narrow widths). margin overrides the size.

  3. 3

    fitHeight makes one tall page

    With fitHeight=true the PDF is a single page whose height follows the rendered content. Best with a fixed width (80mm) and small margins.

pdf.bizkithub.com/#combinationsPage 4 of 6
BizKitHub PDF · API reference05 · Examples
§ 5

Common configurations

Copy, tweak, ship.

5.1Default: zero margins

Edge to edge. For full-bleed designs or when your HTML carries its own padding.

POST https://pdf.bizkithub.com/generator

5.2A4 with print-safe margins

Recommended for multi-page documents. Consistent margins on every page.

POST https://pdf.bizkithub.com/generator?autoHeight=true

5.3Narrow page, still paginated

Very long receipts or logs on a narrow page.

POST https://pdf.bizkithub.com/generator?autoHeight=true&width=80mm

5.4Receipt: one page, auto height

Thermal receipts. No pagination, height follows the content.

POST https://pdf.bizkithub.com/generator?autoHeight=true&fitHeight=true&width=80mm&margin=2mm

5.5Custom margin

Override the default margin when autoHeight is on.

POST https://pdf.bizkithub.com/generator?autoHeight=true&width=80mm&margin=2mm

5.6Explicit page size

Labels and tickets with fully controlled dimensions.

POST https://pdf.bizkithub.com/generator?autoHeight=true&width=100mm&height=150mm&margin=4mm
pdf.bizkithub.com/#examplesPage 5 of 6
BizKitHub PDF · API reference06 · Attachments
§ 6

Embed ISDOC, XML or JSON inside the PDF

One hybrid file: a PDF people read and data software imports. Adobe Reader lists the attachments; Pohoda, Money and iDoklad extract ISDOC automatically.

Switch the request Content-Type from text/html to multipart/form-data. All query parameters keep working. Without attachments keep sending text/html; that path is fully backwards compatible.

Multipart partRepeatablePurpose
htmlnoThe HTML to render, the same markup a text/html body would carry.
attachmentyes (0…N)Each file part is embedded into the PDF. Filename from the part's filename=, MIME type from its Content-Type.
attachments_metanoJSON array of { filename, relationship?, description?, mimeType? }, matched by filename. Overrides auto-detection.
relationship.
Source, Data, Alternative, Supplement or Unspecified (PDF/A-3 AFRelationship). Default Unspecified, or Source for .isdoc.
description.
Label shown in the reader's attachments panel.
mimeType.
Overrides the detected MIME. .isdoc and .xml default to application/xml.
curl -X POST 'https://pdf.bizkithub.com/generator?autoHeight=true&uuid=inv-2026-001' \
  -F '[email protected];type=text/html' \
  -F '[email protected]' \
  -o invoice.pdf
Listing 6.1. Hybrid invoice: ISDOC embedded and auto-detected (relationship=Source, application/xml).
curl -X POST 'https://pdf.bizkithub.com/generator?autoHeight=true' \
  -F '[email protected];type=text/html' \
  -F '[email protected]' \
  -F '[email protected]' \
  -F 'attachments_meta=[{"filename":"delivery-note.pdf","relationship":"Supplement","description":"Delivery note"}]' \
  -o invoice.pdf
Listing 6.2. Multiple attachments with an explicit manifest.
pdf.bizkithub.com/#attachmentsPage 6 of 6

End of document.

Full documentation