---
title: "Print PDF from Blob using JavaScript | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/print/from-blob/"
md_url: "https://www.nutrient.io/guides/web/print/from-blob.md"
last_updated: "2026-06-08T17:11:05.609Z"
description: "Learn how to print a document from a Blob using Nutrient with object URLs. Follow our easy steps to initiate printing seamlessly."
---

# Print PDFs from a Blob using JavaScript

If you want to start printing a document loaded in a `Blob`, create an object URL and provide that to the `document` option in the configuration object passed to [`NutrientViewer.load()`](https://www.nutrient.io/api/web/NutrientViewer.html#.load).

Then, call [`instance.print()`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#print) when the SDK has loaded. The printing dialog should display, indicating the PDF has started printing:

```js

const documentObjectUrl = URL.createObjectURL(blob);
NutrientViewer.load({
  document: documentObjectUrl
  //...
}).then((instance) => {
    URL.revokeObjectURL(documentObjectUrl);
    // Print when loaded.
    instance.print();
  }).catch((error) => {
    URL.revokeObjectURL(documentObjectUrl);
    console.error("Failed to load document:", error.message);
  });

```
---

## Related pages

- [Auto print PDFs using JavaScript](/guides/web/print/auto-print.md)
- [Disable print options in PDFs using JavaScript](/guides/web/print/disable-printing.md)
- [Print PDFs from URLs using JavaScript](/guides/web/print/from-url.md)
- [JavaScript library to print PDFs](/guides/web/print.md)
- [Print PDFs without annotations using JavaScript](/guides/web/print/without-annotations.md)
- [Print PDFs without opening using JavaScript](/guides/web/print/without-opening-pdf.md)
- [Print PDFs from Base64 using JavaScript](/guides/web/print/from-base64.md)
- [Print to PDFs programmatically using JavaScript](/guides/web/features/printing.md)
- [Print modes in our JavaScript PDF viewer](/guides/web/print/print-modes.md)

