If you want to start printing a PDF the moment it’s loaded, you can do this with the instance.print() API method.

Call this method when the SDK has finished loading, and a printing dialog indicating the PDF has started printing will appear:

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