---
title: "Import PDF annotations in Node.js | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/nodejs/annotations/import-annotations/"
md_url: "https://www.nutrient.io/guides/nodejs/annotations/import-annotations.md"
last_updated: "2026-06-19T09:21:00.301Z"
description: "Import PDF annotations in Node.js using Nutrient Node.js SDK. Learn to load documents with Instant JSON and generate annotated PDF outputs efficiently."
---

# Import PDF annotations in Node.js

You can annotate PDFs with Node.js by importing them into an input file and including an [Instant JSON](https://www.nutrient.io/guides/nodejs/json.md) file that contains annotations when initializing an instance via the `load` function.

Before you get started, make sure [Nutrient Node.js SDK is up and running](https://www.nutrient.io/sdk/nodejs/getting-started.md).

You can download these sample files to use as you work through the examples in this guide:

- [Example document](https://www.nutrient.io/assets/nutrient-media/guides/nodejs/files/4-page-example-document.pdf)

- [Example Instant JSON](https://www.nutrient.io/assets/nutrient-media/guides/nodejs/files/example.instant.json)

## Applying Instant JSON to a document

```js

import fs from "node:fs";
import { load } from "@nutrient-sdk/node";

const pdfDoc = fs.readFileSync("source.pdf");
const myInstantJSON = JSON.parse(
  fs.readFileSync("instantjson.json", "utf-8")
);

const instance = await load({
  document: pdfDoc,
  instantJSON: myInstantJSON
});
const buffer = await instance.exportPDF();

fs.writeFileSync("output.pdf", Buffer.from(buffer));
await instance.close();

```
---

## Related pages

- [Export PDF annotations in Node.js](/guides/nodejs/annotations/export-annotations.md)
- [Flatten PDF annotations in Node.js](/guides/nodejs/annotations/flatten-annotations.md)
- [PDF annotation library for Node.js](/guides/nodejs/annotations.md)

