Designer & tools

Examples

The runnable examples inside the Playground, covering every content type and integration style.

Last updated

PrintLink embeds an example centre (http://127.0.0.1:17888/playground/) where every example runs directly; the code shown is the code that executes.

Running them

  1. Turn on the Playground in console Settings (off by default).
  2. Visit http://127.0.0.1:17888/playground/.
  3. Connect, pick a printer and follow the recommended order at the top.

Real printing is a separate switch; while it is off, examples only preview and validate.

The examples

ExampleDemonstrates
Detect the local PrintLinkPrintLink.detect() probing install and running state
Print a PDF silentlyUpload sample.pdf → print → watch job events
A4 reportA code-built report: Chinese headers, rows, barcodes, date binding
58 / 80mm receiptBoth thermal widths plus a QR code
LabelA 100×150mm label with placeholder binding
Print an imageA local PNG/JPEG or canvas, fitted to the chosen paper
Mixed multi-pageImage + PDF + template in one job, see below
Hiprint templateTemplate JSON converted through the adapter
Capability explorationReading and displaying real printer capabilities
Unsupported optionsObserving downgrades and warnings
ProfilesCreate / rename / set default / delete
Direct HTTPThe fetch flow without the SDK
ScanList scanners → scan → fetch the pages

Mixed multi-page recipes

The /playground/mixed/ page offers ready-made combinations:

RecipeContent
Several photos4 images = 4 pages in one job
Several PDFsPage counts add up
Image + PDF + imageThumbnails badge the different sources
PDF + packing slipThe slip carries its own data
One template × NN pages in one job

In the custom list you can select several PNG / JPEG / PDF files; the filmstrip order is the output order and can be dragged.

See also

On this page