This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/samples/edit-pdf-javascript.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Edit PDF in JavaScript | Nutrient

Add, remove, duplicate, rotate, or reorder pages in a PDF document. Combine multiple documents, split them up, or extract selected pages into a new file. Get additional resources by visiting our JavaScript PDF editor library.


import PSPDFKit from "@nutrient-sdk/viewer";
export function load(defaultConfiguration) {
return PSPDFKit.load({
...defaultConfiguration,
documentEditorConfiguration: {
thumbnailMinSize: 50,
thumbnailMaxSize: 5000,
thumbnailDefaultSize: 400,
},
}).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.