JSPM

browser-pdf-support

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 113
  • Score
    100M100P100Q78858F
  • License MIT

detects support for rendering PDF in browser

Package Exports

  • browser-pdf-support

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browser-pdf-support) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Can I has PDF?

A tiny NPM module that determines if the browser can render PDFs, either with built-in support like Safari, Chrome and Firefox, or with Adobe Acrobat in Internet Explorer.

The module is expected to be used with the amazing browserify.

var pdfSupport = require('browser-pdf-support');

if (pdfSupport()) {
  console.log('we has PDF!');
} else {
  console.log('oh dear, you'll need to download acrobat or a real browser...');
}