Some test text!
WebViewer provides a standard API that works the same way for any of the deployment options. This allows you to easily try out different WebViewer deployment options with minimal code changes.
The WebViewer initializer gives you an instance object that provides a number of functions and objects. All of the APIs available here (with a few exceptions) are considered the standard WebViewer API.
The standard API is a combination of the default WebViewer UI APIs and the WebViewer Core APIs.
WebViewer({
// options here
}, document.getElementById('viewer'))
.then(instance => {
// common properties and functions you might use
// WebViewer UI APIs
instance.setHeaderItems(...);
instance.searchText(...);
// WebViewer Core APIs
const docViewer = instance.docViewer;
docViewer.getPageCount();
const doc = docViewer.getDocument();
const annotManager = instance.annotManager;
annotManager.getAnnotationsList();
const CoreControls = instance.CoreControls;
const Tools = instance.Tools;
const Annotations = instance.Annotations;
});
The PDFNet property on the instance is the main exception and is also known as the full API. See this guide for more information about what it is and why you might want to use it.
The permanent page manipulation APIs on the Document object and the applyRedactions function on AnnotationManager are only available in client only mode or with WebViewer Server. To achieve similar functionality with a custom server you would do the processing on the server side and reconvert the file.
Get the answers you need: Support
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Web
Android
iOS
Windows
Linux
Unlimited usage. No email address required.