Nutrient Web SDK allows you to open and annotate images. Get additional resources by visiting our guide on how to add annotations to images using JavaScript.


import PSPDFKit from "@nutrient-sdk/viewer";
export function load(defaultConfiguration) {
const toolbarItems = [
{ type: "zoom-out" },
{ type: "zoom-in" },
{ type: "marquee-zoom" },
{ type: "pan" },
{ type: "spacer" },
{ type: "ink" },
{ type: "text" },
{ type: "stamp" },
{ type: "note" },
{ type: "arrow" },
{ type: "line" },
{ type: "rectangle" },
{ type: "ellipse" },
{ type: "polygon" },
{ type: "polyline" },
{ type: "spacer" },
{ type: "export-pdf" },
{ type: "print" },
];
// Enable comments on Server with Instant.
if (defaultConfiguration.documentId && defaultConfiguration.instant) {
toolbarItems.splice(9, 0, { type: "comment" });
}
return PSPDFKit.load({
...defaultConfiguration,
toolbarItems,
}).then((instance) => {
console.log("Nutrient Web SDK successfully loaded!!", instance);
return instance;
});
}

This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.