Skip to content

Latest commit

 

History

History

README.md

WebViewer - offline sample

WebViewer is a powerful JavaScript-based PDF Library that is part of the Apryse SDK. It provides a slick out-of-the-box responsive UI that enables you to view, annotate and manipulate PDFs and other document types inside any web project.

This sample shows how you can load WebViewer offline using service worker and localforage.

Get your trial key

A license key is required to run WebViewer. You can obtain a trial key in our get started guides, or by signing-up on our developer portal.

Initial setup

Before you begin, make sure your development environment includes Node.js.

Install

git clone --depth=1 https://github.com/ApryseSDK/webviewer-samples.git
cd webviewer-samples/webviewer-offline
npm install

Generate the list of files for service worker

In the root folder, run the following

node prepare-serviceworker-list.js

This will generate a json file service-worker-list.json that contains the list of files to be cached in service worker.

Run

npm start