This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/features/printing.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. JavaScript print to PDF programmatically | Nutrient SDK

In addition to using the standard print button from the main toolbar, printing can be managed programmatically via the API.

Nutrient Web SDK supports two instance methods for starting and aborting a print task:

NutrientViewer.load(configuration)
.then((instance) => {
instance.print();
instance.abortPrint();
})
.catch((error) => {
console.error("Failed to load document:", error.message);
});

Note that abortPrint is only available for the NutrientViewer.PrintMode.DOM mode.