batchPrint API reference & merge rules

batchPrint runs multiple print jobs; args 2–4 are batch defaults—per-task options override.

Signature

batchPrint(list, pdfOptions?, printOptions?, extraOptions?)

Parameters

RuleNotes
DefaultsArgs 2–4 apply to all tasks
OverridePer-task pdf/printOptions win

Minimal example

import webPrintPdf from 'web-print-pdf';

await webPrintPdf.printHtml('<p>Hello</p>', {}, { copies: 1 });

When to use

  • Label waves, month-end batches
  • Prefer over printHtml loops at peak

Read next

FAQ

vs looping printHtml?

Client-side queue—fewer round trips.

Different printers per task?

Yes—override printOptions per task.

Partial failures?

Inspect results + formatPrintError.

Defaults required?

Optional if each task is complete.

Remote push batch?

Server may push arrays; client executes accordingly.

Client deployment by platform

The same web-print-pdf front-end runs on Windows, macOS, and Linux/domestic OS—install the matching client on each desktop.

Download client — free trial View npm package Documentation