Socket
Socket
Sign inDemoInstall

pdf-shower-vue

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pdf-shower-vue

一款基于pdf.js的vue pdf查看组件


Version published
Weekly downloads
15
increased by15.38%
Maintainers
1
Install size
1.09 MB
Created
Weekly downloads
 

Readme

Source

vue-pdf-shower

Componente Vue pra exibição de pdfs.

O componente utilizada a biblioteca PDFJS para buscar e retornar o documento desejado na tela.

github(Original Source)

vue-pdf-shower

github(Forked Version)

vue-pdf-shower-pt-br

install

npm i pdf-shower-vue --save

example

<template>
    <div>
         <pdfshower 
            :pdfurl="pdfurls" 
            :scale="scale" 
            @onErr="onErr"
        ></pdfshower>
    </div>
</template>

<script>
import pdfshower from 'vue-pdf-shower';
export default {
    name: 'pdfshower',
    components: {
        pdfshower
    },
    data() {
        return {
            // Url do PDF
            pdfurls: '//cdn.mozilla.net/pdfjs/tracemonkey.pdf',
            // Padrão: 1
            scale: 1.2
        };
    },
    methods: {
        // callback
        onErr(err) {
            console.log('Não foi possível exibir o pdf desejado');
            console.log('Erro:', err);
        }
    }
};
</script>

Keywords

FAQs

Last updated on 15 May 2018

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