Some test text!

Hamburger Icon

iOS / Guides

Options for PDF viewing in Ionic and Cordova

Apryse offers two options for displaying PDF and Office documents in Ionic and Cordova apps. Both offer offline functionality and the ability to view and annotate PDF documents.

This guide explains the options and their relative strengths.

1. Native plugin

The native plugin provides a JavaScript interface to Apryse's native mobile SDKs (iOS, Android). The JavaScript bridge API is identical for iOS and Android, and designed to mirror the WebViewer API.

The native plugin supports displaying the document viewer/annotator full screen, or over an area specified by a <div>.

The relative strengths of using a native plugin over the WebViewer option (discussed below) are:

  • Performance: true native performance for scrolling, zooming and animations.
  • Appearance: native controls that appear and behave in accordance with platform norms and possibly user expectations.
  • Rendering speed: good rendering speed on all devices, including older models with limited memory.
  • PDF streaming: The native plugin supports streaming , where a remote PDF is viewable before it has been downloaded in its entirety, and can even be configured to only download the pages of a PDF that are actually viewed by the user, saving on mobile data usage.

2. WebViewer

WebViewer is a JavaScript document viewer and PDF renderer. It is built from the ground up for "the web": desktop browsers, mobile browsers and Ionic/Cordova apps.

The relative strengths of using WebViewer inside your Ionic/Cordova app are:

  • Extensive API: The full WebViewer API is immediately available. (The native plugins currently expose a limited subset of their APIS to JavaScript.)
  • Identical API: The API used for a website written using WebViewer will be 100% identical that used in the Ionic/Cordova app.
  • Identical UI: The UI is the same across all devices (rather than adopting the platform's UI norms).
  • .xod files The WebViewer can open and render .xod files, which are PDF files that have been optimized for web-viewing (PDF files can also be rendered directly, but with degradation in performance).

Get the answers you need: Chat with us