Hiprint templates
Print vue-plugin-hiprint template JSON through the adapter, mix it with other content, and what converts.
Last updated
Projects that already build templates with vue-plugin-hiprint can print them through the adapter, without changing the templates themselves.
PrintLink ships no Hiprint designer and copies no third-party print plug-in
API. Build templates in the Hiprint online designer,
export the JSON from hiprintTemplate.getJson(), and hand it to PrintLink.
Convert and print
import { PrintLinkClient } from '@printlink/sdk';
import { hiprintItem } from '@printlink/hiprint';
const { item, warnings, unsupported } = hiprintItem(template, { orderNo: 'SO-2026-0001' });
// Unsupported nodes are never dropped silently — they are listed here
console.log(warnings, unsupported);
await client
.compose({ queueId })
.paper('A4') // the one sheet for the job; template page size is content size
.add(item)
.printAndWait();The explicit equivalent is convertTemplate(template) followed by
.addDocument(converted).data({...}). Template field bindings are translated
into {{placeholders}}.
Mixing with other content
A Hiprint invoice, a packing-list PDF and a signature photo can be one job:
await client
.compose({ queueId })
.paper('A4')
.add(hiprintItem(invoiceTemplate, order).item)
.addPdf(packingListPdf)
.addImage(signaturePhoto)
.printAndWait();See composite jobs.
What converts
| Supported | Notes |
|---|---|
| Text, long text | Long text does not paginate |
| Images, QR codes, common barcodes | |
| Lines, rectangles | |
| Basic tables | Column definitions and row heights convert; advanced features downgrade |
| Page size and basic fonts |
A persisted overall scale in the template is ignored — PrintLink renders at real millimetre/point sizes rather than applying Hiprint's own scale factor.
HTML controls inside a template become plain text, with a
HIPRINT_HTML_TEXT_FALLBACK warning. If you genuinely need web layout, add that
HTML separately as an HTML source item in the same job.
About the warnings
Each warning carries a severity:
info— a known-harmless downgrade, such as editor metadata (draggable,fixed) or decorative styles (letterSpacing). Safe to collapse.warning(the default) — a real content or layout change the author should confirm: HTML turned into text, an image with an emptysrc, a table column missing itsfield.
Similar issues are merged into one entry with a count, so a standard template usually leaves only a handful of actionable warnings rather than a screenful.
Try it in the console
Open the Playground's Hiprint page
(http://127.0.0.1:17888/playground/hiprint/) and paste the template JSON to see
the converted result and its warnings before putting it into code.