Skip to content

ApryseSDK/webviewer-cordova-sample

Repository files navigation

WebViewer - Cordova sample

WebViewer is a powerful JavaScript-based PDF Library that is part of the Apryse PDF SDK. It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs that can be embedded into any web project.

WebViewer UI

This repo is specifically designed for any users interested in integrating WebViewer into Cordova project. This project was generated with Cordova CLI. See Create your first Cordova app for more information.

The repo uses the WebViewer Server as a backend for extending browser & file viewing compatibility. Alternatively, a Custom server can be developed for use with the WebViewer.

The offline branch of this repo shows how the WebViewer can be used in a Cordova app without connecting to the WebViewer server backend or using the extended functionality that the server provides.

Initial setup

Before beginning, make sure the development environment includes Node.js and Cordova CLI.

This repo requires a WebViewer Server to be set up and the URL provided to the webviewerServerURL option for the Webviewer in www/js/index.js .

Install

git clone https://github.com/PDFTron/webviewer-cordova-sample.git
cd webviewer-cordova-sample
npm install

Run in the browser

npm start

Run in an iOS emulator

Before you begin, you need the latest MacOS and XCode installed

npm install -g plugman
cordova platform add ios
cordova run --list --emulator
## use name of the device from the list above, for example IPAD
npm run start-ios -- --target="iPad-Pro--9-7-inch-, 15.0"

Run in other platforms

To run in platforms other than browser and iOS, you can refer to official Cordova guides:

WebViewer APIs

Contributing

See contributing.

License

See license.

About

A sample WebViewer app in Cordova/Ionic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published