---
title: "JavaScript headless PDF generation | Nutrient"
canonical_url: "https://www.nutrient.io/guides/web/pdf-generation/headless/"
md_url: "https://www.nutrient.io/guides/web/pdf-generation/headless.md"
last_updated: "2026-05-30T02:20:01.413Z"
description: "It’s possible to generate PDFs or DOCX files without the need to present any user interface (UI) to the user. for Nutrient Web SDK."
---

# Headless PDF generation

It’s possible to generate PDFs or [DOCX files](https://www.nutrient.io/guides/web/pdf-generation/from-word-template.md) without the need to present any user interface (UI) to the user.

## Standalone

In [Standalone mode](https://www.nutrient.io/guides/web/about/operational-modes.md) of Nutrient Web SDK, you can perform the operation using JavaScript in the browser by setting the `headless` option as `true` when loading the JavaScript library. This indicates you don’t want a UI:

```js

NutrientViewer.load({
    //...
    headless: true
}).then((instance) => {
    // Apply your operations.
}).catch((error) => {
    console.error("Failed to load viewer:", error.message);
});

```

Once the SDK is loaded, you can apply any of our operations as normal.

## Server-backed

When using the Server-backed [operational mode](https://www.nutrient.io/guides/web/about/operational-modes.md), a variety of operations are available server-side. Refer to the [Document Engine documentation](https://www.nutrient.io/guides/document-engine.md) for additional information.
---

## Related pages

- [Generate PDFs from images using JavaScript](/guides/web/pdf-generation/from-images.md)
- [Generate a PDF with a PDF form using JavaScript](/guides/web/pdf-generation/from-pdf-form.md)
- [JavaScript PDF generation library](/guides/web/pdf-generation.md)
- [Generate PDFs from a template using JavaScript](/guides/web/pdf-generation/from-pdf-template.md)
- [Generate PDFs from a Word template using JavaScript](/guides/web/pdf-generation/from-word-template.md)
- [Generate PDF reports using JavaScript](/guides/web/pdf-generation/pdf-reports.md)
- [Generate PDF thumbnails using JavaScript](/guides/web/pdf-generation/thumbnail-preview.md)

