Class AbstractPrintTaskAbstract

Different printer models have different print algorithms. Print task defines this algorithm.

const quantity = 1;

const printTask = client.abstraction.newPrintTask("D110", {
totalPages: quantity
});

try {
await printTask.printInit();
await printTask.printPage(encodedImage, quantity); // encode your canvas with ImageEncoder.encodeCanvas
await printTask.waitForFinished();
} catch (e) {
alert(e);
} finally {
await client.abstraction.printEnd();
}

Hierarchy (view full)

Constructors

Properties

abstraction: Abstraction
pagesPrinted: number
printOptions: PrintOptions

Methods