For the complete documentation index, see llms.txt. This page is also available as Markdown.
EditingFull-API

Preprocess document before viewing

Requirements

These packages are required to use these features in production. Trial keys have unlimited access to all features

Web SDKFull API

This JavaScript sample lets you preprocess and make modifications to a PDF, DOCX, XLSX or PPTX document before it is displayed in WebViewer (no servers or other external dependencies required). This is often used to fix corrupt PDF content or add watermarks to documents before displaying them.

A common example of how this functionality is used occurs when user ID, timestamp and IP address is added to a document before loading to limit document sharing.

In the case of MS Office files, modifications are applied to the PDF file and will require the Office Conversion Package for WebViewer license.

This sample works on all browsers (including IE11) and mobile devices without using plug-ins.

Implementation steps

Step 1: Get started with WebViewer in your preferred web stack

Step 3: Add the sample code provided in this guide

This full sample is one of many included in the manual download of WebViewer.