Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdfviewer

Package Overview
Dependencies
Maintainers
6
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfviewer

PDF Viewer using Mozila PDF JS.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
229
decreased by-14.23%
Maintainers
6
Weekly downloads
 
Created
Source

PDF Viewer

Lightweight PDF viewer using Mozilla's PDF JS.

NPM version Build Status

Screenshot

'screenshot'

Pre-requirments

npm install
npm run build

Deploy dist to your own static server.

Usage

See example in test directory

Options

The options PdfViewer accepts are:

  1. pdfUrl(required): URL to your pdf file, can be relative or absolute. If it is a cross-domain path, the remote server must support CORS.

  2. staticHost(required): Static files host, PdfViewer dependents on Mozila's PDF.js and our viewer.js, which must be served.

  3. onerror(optional): A custom onerror callback function, if error occurs when reading or rendering your pdf file, this function will be called. If omitted, our viewer's default error handler will be used.

Examples

To get a demo:

  1. Run command:
npm start
  1. Test viewer.js:
http://localhost:9000
  1. Test pdfviewer.js (viewer.js in iframe):
http://localhost:9001

Who's using

Keywords

FAQs

Package last updated on 13 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc