---
title: "Print modes in JavaScript PDF viewer | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/print/print-modes/"
md_url: "https://www.nutrient.io/guides/web/print/print-modes.md"
last_updated: "2026-06-09T10:25:14.548Z"
description: "To print a document with Nutrient Web SDK, you can choose between two printing modes, each with its own tradeoffs."
---

# Print modes in our JavaScript PDF viewer

To print a document with Nutrient Web SDK, you can choose between two [printing modes](https://www.nutrient.io/api/web/enums/NutrientViewer.PrintMode.html), each with its own tradeoffs.

The available modes are:

- `NutrientViewer.PrintMode.DOM`

- `NutrientViewer.PrintMode.EXPORT_PDF`

It’s possible to configure the `printMode` via the initial [configuration](https://www.nutrient.io/api/web/interfaces/Configuration.html#printmode):

```js

NutrientViewer.load({
  printMode: NutrientViewer.PrintMode.EXPORT_PDF
}).catch((error) => {
  console.error("Failed to load document:", error.message);
});

```

It’s also possible to enforce a print mode when printing programmatically via the API ([try it in the Playground](https://www.nutrient.io/demo/sandbox?p=eyJ2IjoxLCJzZXR0aW5ncyI6eyJmaWxlTmFtZSI6ImJhc2ljLnBkZiJ9LCJqcyI6ImNvbnNvbGUubG9nKFwiRGVtb25zdHJhdGluZyBwcmludCBtb2Rlcy4uLlwiKTtcblxuTnV0cmllbnRWaWV3ZXIubG9hZCh7XG4gIC4uLmJhc2VPcHRpb25zLFxuICBwcmludE1vZGU6IE51dHJpZW50Vmlld2VyLlByaW50TW9kZS5FWFBPUlRfUERGLFxufSkudGhlbihhc3luYyAoaW5zdGFuY2UpID0%252BIHtcbiAgY29uc29sZS5sb2coXCJOdXRyaWVudCBsb2FkZWQhXCIpO1xuICBjb25zb2xlLmxvZyhcIkRlZmF1bHQgcHJpbnQgbW9kZSBzZXQgdG86IEVYUE9SVF9QREZcIik7XG5cbiAgLy8gQ3JlYXRlIGEgc2FtcGxlIGFubm90YXRpb24gdG8gc2hvdyBpdCBhcHBlYXJzIGluIHByaW50XG4gIGNvbnN0IGFubm90YXRpb24gPSBuZXcgTnV0cmllbnRWaWV3Z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ldyBQcm9taXNlKHJlc29sdmUgPT4gc2V0VGltZW91dChyZXNvbHZlLCAyMDAwKSk7XG5cbiAgLy8gVHJpZ2dlciBwcmludCBwcm9ncmFtbWF0aWNhbGx5IHdpdGggZXhwbGljaXQgbW9kZVxuICBpbnN0YW5jZS5wcmludCh7XG4gICAgbW9kZTogTnV0cmllbnRWaWV3ZXIuUHJpbnRNb2RlLkVYUE9SVF9QREZcbiAgfSk7XG5cbiAgY29uc29sZS5sb2coXCJQcmludCBkaWFsb2cgb3BlbmVkIVwiKTtcbiAgY29uc29sZS5sb2coXCJUaGUgcHJpbnQgdXNlcyBFWFBPUlRfUERGIG1vZGUgZm9yIGFjY3VyYXRlIHJlbmRlcmluZ1wiKTtcbn0pO1xuIiwiY3NzIjoiLyogQWRkIHlvdXIgQ1NTIGhlcmUgKi9cblx0In0%253D)):

```js

instance.print({
  mode: NutrientViewer.PrintMode.EXPORT_PDF
});

```

## NutrientViewer.PrintMode.DOM

`NutrientViewer.PrintMode.DOM` is the default printing mode because of its reliability and cross-browser support. This method renders all pages of a PDF document as images before sending them to the printer. The advantages of this mode are that it’s supported by all major browsers and it doesn’t give your users access to the source PDF file.

**Performance warning:** `PrintMode.DOM` renders all pages as images before printing. For documents with more than 50 pages, this may cause browser memory issues or crashes. Use `PrintMode.EXPORT_PDF` for large documents.

When printing with `NutrientViewer.PrintMode.DOM`, you might get a warning message about incorrect printing results due to pages with different sizes. The reason for this warning is that this printing mode renders each page as an image at a specified DPI (dots per inch) before sending it to the printer. Because the original pages may have different dimensions, converting them to images with a fixed scale can lead to discrepancies in how the content is displayed and printed. This can result in inconsistencies in the visual appearance and quality of the printed output. To mitigate this issue, use `NutrientViewer.PrintMode.EXPORT_PDF` as explained below.

## NutrientViewer.PrintMode.EXPORT_PDF

This method is resource efficient and lets you avoid having to render every page in advance, which could balloon memory usage to multiple GBs on PDFs with more than 100 pages.

Google Chrome and Microsoft Internet Explorer provide the APIs required to use the native renderer; meanwhile, as a fallback on other browsers, we generate and open a PDF in a new tab. This allows users to print the PDF in a native PDF reader which can, in contrast to browser-built implementations, talk directly to the connected printer. A drawback of this approach is that it might give users access to the source files.

Below is an overview of all supported browsers and their behaviors.

- **Google Chrome** — This browser is fully supported. Printing a PDF page will use the native renderer that’s part of the Chrome browser.

- **Internet Explorer 11** — This browser is partially supported. To support printing, the [Windows Media Feature Pack](https://www.microsoft.com/en-us/download/details.aspx?id=48231) must be installed, which is the case on 99 percent of all Windows installations, unless you use the N or KN editions. If the Windows Media Feature Pack is installed, the browser will ask you to install the Adobe Reader PDF extension upon first use. With this extension enabled, printing works as expected and without opening a new tab.

  Internet Explorer 11 is no longer supported in our Web SDK [as of version 2022.5](https://www.nutrient.io/blog/pspdfkit-web-2022-5-content-editor-and-measurement-tools/). Edge 18 is no longer supported in our Web SDK [as of version 2023.2](https://www.nutrient.io/blog/pspdfkit-web-2023-2-comment-mentions-notifications/).

- **Microsoft Edge** — This browser opens a new tab and uses the built-in WinRT PDF Renderer (Windows.Data.Pdf) library. Edge no longer supports ActiveX and thus doesn’t support third-party plugins such as Adobe Reader.

- **Apple Safari** — This browser opens a new tab which loads either Apple’s Preview PDF renderer or the Adobe Reader plugin, if installed.

- **Mozilla Firefox** — This browser opens a new tab, which renders the PDF via Mozilla’s JavaScript PDF renderer, albeit slowly.

Check out our [API reference](https://www.nutrient.io/api/web/enums/NutrientViewer.PrintMode.html) for more information.
---

## Related pages

- [Print PDFs from Base64 using JavaScript](/guides/web/print/from-base64.md)
- [Print PDFs from a Blob using JavaScript](/guides/web/print/from-blob.md)
- [Auto print PDFs using JavaScript](/guides/web/print/auto-print.md)
- [Print PDFs from URLs using JavaScript](/guides/web/print/from-url.md)
- [Disable print options in PDFs using JavaScript](/guides/web/print/disable-printing.md)
- [JavaScript library to print PDFs](/guides/web/print.md)
- [Print to PDFs programmatically using JavaScript](/guides/web/features/printing.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)

