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

pdfjs-viewer-element

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfjs-viewer-element

A web component for [PDF.js viewer](https://mozilla.github.io/pdf.js/web/viewer.html). See [demo](https://alekswebnet.github.io/pdfjs-viewer-element/index.html).

  • 2.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
821
increased by12.01%
Maintainers
1
Weekly downloads
 
Created
Source

pdfjs-viewer-element

A web component for PDF.js viewer. See demo.

⚠️ pdfjs-viewer-element uses PDF.js prebuilt, that includes the generic build of PDF.js and the viewer. To use the package you should extract the prebuilt files into some directory of your project. You may specify the path to this directory with viewer-path property (by default is '/pdfjs').

Install

npm install --save pdfjs-viewer-element
yarn add pdfjs-viewer-element

or

<script type="module" src="https://cdn.skypack.dev/pdfjs-viewer-element"></script>

Usage

Extract the PDF.js prebuilt. See demo example.

import 'pdfjs-viewer-element'
<pdfjs-viewer-element src="/compressed.tracemonkey-pldi-09.pdf" viewer-path="/path-to-viewer"></pdfjs-viewer-element>

Properties

src - path to pdf file.

viewer-path - path to prebuilt directory (by default is '/pdfjs').

License

MIT

Keywords

FAQs

Package last updated on 09 Mar 2023

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