Some test text!

keyboard_arrow_down

Getting started

keyboard_arrow_down

Deployment options

keyboard_arrow_down

Webviewer Server

keyboard_arrow_down

Fundamentals

keyboard_arrow_down

Basics

keyboard_arrow_down

Annotations

keyboard_arrow_down

UI

keyboard_arrow_down

Legacy UI

keyboard_arrow_down

Advanced

keyboard_arrow_down

PDFNetJS Full

keyboard_arrow_down

PDF Processing API

Optimizing the lib folder

In this document
chevron_rightOptimize via script
chevron_rightOptimize manually
chevron_rightDeploying with the default UI
chevron_rightDeploying with the legacy UI

Webviewer comes bundled with the files required for all use cases. In many situations, all these files are not needed.

linkOptimize via script

A script comes packaged with Webviewer that can be used to delete any files that you will not be using. You can run this script by (at the root of your WebViewer folder) executing:

npm run optimize

The script will ask you a series of questions, and delete files based on your answers:

Will you be using the new UI?

Answer yes to this question if you want to use the new ui. A preview of this UI can be found here.

Answer no if you want to use the legacy ui.

Will you be converting all your documents to XOD?

Answer yes to this question if you will be using a server to convert all your documents to the XOD format before viewing.

Answer no if you will be opening any format other than XOD.

Do you need client side office viewing support?

Anwser yes to this question if you want to support opening Microsoft Office files (such as .docx, .ppt).

Anwser no if you do not need Microsoft office support.

Do you need the full PDF API?

We provide a full API that can process documents outside of the viewer.

Anwser yes to this question if you need to access to the full API.

In most cases, you do not need the full API and can anwser no to this question.

linkOptimize manually

By default, lib folder contains many different folders to support different configs and enhance user customizations. However, when you want to deploy it to your project, you might want to optimize the lib folder to remove unnecessary folders.

linkDeploying with the default UI

If you are deploying with the default UI, you only need the following folders/files:

  1. core
  2. ui/build
  3. webviewer.min.js

which will make the lib folder simplified as follows:

- lib
  - core
  - ui
    - build
  - webviewer.min.js

linkDeploying with the legacy UI

If you are deploying with the legacy UI, you only need the following folders/files:

  1. core
  2. ui-legacy
  3. webviewer.min.js

which will make the lib folder simplified as follows:

- lib
  - core
  - ui-legacy
  - webviewer.min.js