Socket
Socket
Sign inDemoInstall

pdfjs-viewer-element

Package Overview
Dependencies
0
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pdfjs-viewer-element

A web component for viewing pdf files in the browser. The package is based on [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html) build and works with any framework.


Version published
Weekly downloads
313
increased by4.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

pdfjs-viewer-element

A web component for viewing pdf files in the browser. The package is based on PDF.js default viewer build and works with any framework.

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

Status

npm version Package Quality

Docs

Getting started

Api

Install

Using module bundlers:

# With npm
npm install pdfjs-viewer-element
# With yarn
yarn add pdfjs-viewer-element
import 'pdfjs-viewer-element'

Using browser:

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

Usage

<pdfjs-viewer-element src="/file.pdf" viewer-path="/path-to-viewer"></pdfjs-viewer-element>

Properties

src - Path to pdf file

viewer-path - Path to PDF.js prebuilt

locale - Language of the interface

page - Page number

search - Search text

phrase - Search by phrase

zoom - Zoom level

pagemode - Page mode

For more clarity, see the Api docs page.

License

For this package - MIT.

For the pdf.js library - https://github.com/mozilla/pdf.js/blob/master/LICENSE.

Keywords

FAQs

Last updated on 20 Mar 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc