unisoft-vue-pdf

1.0.5 • Public • Published

unisoft-vue-pdf

功能描述

基于pdfjs-dist实现的 PDF 签章 VUE 组件。

安装

npm install unisoft-vue-pdf

使用

<template>
  <unisoft-vue-pdf :pdf-url="pdfurl" :positionList="positionList" :seals="seals" />
</template>

<script>
import UnisoftVuePdf from 'unisoft-vue-pdf'

export default {
  components: { UnisoftVuePdf },
  data() {
        return {
            pdfurl: 'pdf地址',
            positionList: [{
                pageIndex: 15,
                coordinateList:[
                    {posx:400,posy:310,imgUrl:''}
                ]
            }],
            seals: [{
                imgUrl: '签章url或base64'
            }]
        }
  },
}
</script>

全局引入

//src\main.js
import UnisoftVuePdf from "unisoft-vue-pdf";
Vue.use(UnisoftVuePdf);

Props

参数 类型 说明
pdfUrl String pdf 地址
watermark String 水印文字
seals Array 印章数组
└─ imgUrl String 印章图片 url 或 base64
positionList Array 需要盖章的位置及印章数组
└─ coordinateList Array 盖章坐标数组
       └─ posx Number 横向坐标
       └─ posy Number 纵向坐标
       └─ imgUrl String 印章
└─ pageIndex Number 盖章页码
positionWidth Number coordinateList 印章坐标参考宽度,默认 612
readonly Boolean 只读,默认 false
showToolbar Boolean 是否显示工具栏,默认 true。只对 web 端有效,手机端无工具栏

Readme

Keywords

Package Sidebar

Install

npm i unisoft-vue-pdf

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

1.69 MB

Total Files

9

Last publish

Collaborators

  • guanlinzhao