@pdftron/webviewer-downloader

Downloads the latest version of WebViewer

Usage no npm install needed!

<script type="module">
  import pdftronWebviewerDownloader from 'https://cdn.skypack.dev/@pdftron/webviewer-downloader';
</script>

README

webviewer-downloader

NPM package to download the latest version of WebViewer.

This script downloads the zipfile from https://www.pdftron.com/downloads/WebViewer.zip and extracts it + cleans up unused files.

Testing

Run node index.js to install deps in the cwd.

Using

npx @pdftron/webviewer-downloader {params}

Params

--path - The folder you want to install WebViewer, relative to your CWD. Defaults to ./public/lib.

--v - The version you want to download. If none is specified, it will download the latest version.

--core-only - Upon extraction, it will only leave out core folder (deletes UI).

--pdfjs - Downloads the PDFJs wrapper instead of WebViewer

Example

npx @pdftron/webviewer-downloader