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

vue-pdf-cdn

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-pdf-cdn

Lightweight PDF viewer for Vue.js using CDN

  • 2.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
99
increased by1.02%
Maintainers
1
Weekly downloads
 
Created
Source

vue-pdf-cdn

Note: master branch (v 2.*) is for Vue3 only. For usage with Vue2, install v1.* - npm install vue-pdf-cdn^1.0.0

PDF.js is very advanced JS library for parsing and displaying PDF files by Mozilla. This project aims to provide simple and lightweight Vue.js component, that downloads library files lazily from cdn with minimal setup.

Similar projects:

  • vue-pdf - includes PDF.js files into your bundle with webpack. Sometimes this may be undesirable because:
    • it may require additional webpack configuration
    • webpack processing can lead to issues
    • latest webpack has a bug in development mode with worker files
    • it will increase bundle size (pdf.js viewer + worker = about 800 kb) and build time.

Install

yarn add vue-pdf-cdn
# or
npm install vue-pdf-cdn

Usage

<template>
  <pdf
    src="./static/relativity.pdf"
  />
</template>

<script>
import pdf from 'vue-pdf-cdn'

export default {
  components: {
    pdf
  },
}
</script>

Props

  • src - URL of PDF file to load and display

Events

  • @status - triggered when status update happens (library initialized, pdf downloaded, etc.). Provides string describing status.
  • @error - triggered when error happens. Provides error message.
  • @loading - triggered when loading status changes. Provides boolean (true/false).

Author

vue-pdf-cli. Released under the MIT License.

Authored and maintained by leo-buneev and contributors. Huge thanks to FranckFreiburger for initial webpack version.

Keywords

FAQs

Package last updated on 14 Feb 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