npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@telecomsante/pdf-viewer

v3.0.0-pre.1

Published

A pdf-viewer component

Downloads

3

Readme

Published on npm npm package

<pdf-viewer>

pdf-viewer is a simple viewer, without any decoration, based on the Mozilla's pdfjs library. Buttons have to be created by the parent page or component.

the component is written using es6 syntax, and polymer 2.x.

Nota : the pdfjs library uses XMLHttpRequest to load the pdf documents. So, you may encountered CORS problem, if you try to load a document from another origin. A solution could be to use a proxy to serve your documents, you could take advantage to use for example the project CORS Anywhere.

Features

  • Next/Previous page
  • Zoom
  • Polymer 3.x
  • Dynamically change document without page reloading
  • Works in IE11, IOS, Android (chrome)
  • Works in Chrome, Firefox, Safari

Basic usage :

<pdf-viewer   
  src="https://www.w3.org/TR/1998/REC-html40-19980424/html40.pdf"
  initial-zoom="fit-width",
  mode="double",
  page="5"></pdf-viewer>

Using in polymer app

the file bower_components/pdfjs-dist/build/pdf.worker.min.js must be added to extradependencies section into the polymer.json file.

If for some reasons, bower components are installed in another folder, be aware to pass as attribute PDFJS_workerSrc the full path to the pdf.worker.min.js file.

The component is licensed under the ISC License