Skip to Content
NexPDF

Editing pages and documents

Let users edit page text and organise pages (insert, merge, rotate, duplicate, extract, delete, reorder) in an Electron window with NexPDF.

English

License module

Page and content editing, including inserting pictures as pages, needs the editor module (Startup tier and above).

Edit text: the Edit mode

The Edit mode (content) edits the text in the page itself. The user clicks an outlined text block to edit it in place; the original font is kept when it has every character, otherwise the closest standard font is used. Add text places a new text box by dragging on the page. Images on the page can be moved, resized, replaced and deleted.

Organise pages: the Pages mode

The Pages mode (pages) shows every page as a thumbnail. The user selects pages (Ctrl or Command-click to add, Shift-click for a range) and uses:

ToolWhat it does
Insert blankAdds a blank page
Merge PDFAppends the pages of another PDF
Insert imageAdds a picture as a page
Page labelsSets the page numbering styles; see Document structure
Rotate left, Rotate rightRotates the selected pages
DuplicateCopies the selected pages
ExtractSaves the selected pages as a new PDF
DeleteDeletes the selected pages
ReverseReverses the page order
OptimizeRemoves unused objects and recompresses streams; see Compare and optimise
BackgroundSets a page background colour or picture

Offer only some modes

{ "modeConfig": { "availableModes": ["viewer", "content", "pages"] } }

Pass the configuration as the path of a JSON file; see Viewing pages. To hide the page editor completely, leave content and pages out, or set modeConfig.readOnly.

Keep the result

pdf.save(path) writes the edited document and pdf.bytes() returns it as a Buffer. To edit pages in code, use the document API (openDocumentFile, then the calls of the Node.js SDK).

On this page