Legacy UI for WebViewer

Legacy UI is deprecated

The Legacy UI is deprecated. We strongly recommend using the Modular UI for improved performance and features. If your application currently uses the Legacy UI and you want to migrate to Modular UI, refer to our Migration Guide to V11 Modular UI for step-by-step instructions.

A complete and responsive user interface is provided out of the box in the WebViewer download package, allowing you to quickly get started integrating a document viewer into your web app. Zooming, thumbnails, searching, annotation tools and comments are just a few of the features provided by the UI.

APIs are provided to allow you to customize the look and feel of the UI and the code is open source for more advanced customizations. The UI uses WebViewer's core document APIs to handle rendering and document manipulation.

Apryse Docs Image

How it works behind the scenes

When using the UI your web app HTML page might look something like this:

HTML

1<!-- Your app's HTML page -->
2<html>
3 <head>
4 <script src="my-app-code.js"></script>
5 <script src="webviewer/lib/webviewer.min.js"></script>
6 </head>
7 <body>
8 <!-- viewerElement passed to WebViewer -->
9 <div id="viewer">
10 </div>
11 </body>
12</html>

When the page loads, webviewer.min.js will create an iframe inside the specified viewer element with the src set to the WebViewer UI's index.html:

1<div id="viewer">
2 <iframe src="webviewer/lib/ui/build/index.html#d=...">
3 <html>
4 <body>
5 <div id="app">
6
7 </div>
8
9 <script src="../../core/webviewer-core.min.js"></script>
10 </body>
11 </html>
12 </iframe>
13</div>

The UI's HTML file loads webviewer-core.min.js and uses those APIs to render the document.

Apryse Docs Image

How to Use

To use the Legacy UI you need to add the ui property to your WebViewer constructor with the value 'legacy'.

JavaScript

1WebViewer(
2 {
3 path: '/path/to/your/webviewer',
4 initialDoc: '/path/to/your/document.pdf',
5 ui: 'legacy' // enable Legacy UI
6 },
7 document.getElementById("viewer")
8).then((instance) => {
9 // ...
10});

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales