This JavaScript sample lets you customize or modify a PDF, DOCX, XLSX or PPTX document before it is saved/downloaded (client-side, no servers or other external dependencies required).
In this example annotations are flattened before saving the PDF. This functionality allows you to do a variety of modifications to the document before downloading – some common examples include adding stamps / watermarks to the PDF or injecting information into a document.
In the case of MS Office files, modifications are saved into the PDF file. The use of MS Office files will require the Office Conversion Package. (More WebViewer options: you could also manipulate DOCX or XSLX files directly with our DOCX Editor and Spreadsheet Editor.)
This sample works on all browsers (including IE11) and mobile devices without using plug-ins.
Learn more about our Web SDK.
To customize and save PDF documents with JavaScript using WebViewer:
Step 1: Follow get started in your preferred web stack for WebViewer
Step 2: Enable the full API by passing the fullAPI
option into the WebViewer constructor
Step 3: Add the sample code provided in this guide
This full sample is one of many included in the manual download of WebViewer.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales