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

exe-pdf-render

v0.1.8

Published

vue-exe-pdf test

Downloads

194

Readme

exe-pdf-render 组件

简介

基于 Vue 与 Foxit PDF SDK for Web 的二次封装,目前只支持简单的查看PDF文件。

安装

npm install exe-pdf-render

引入

// main.js中

import exePdfViewer from 'exe-pdf-render'
Vue.use(exePdfViewer)

使用

注意事项:需要把该SDK放入项目的根目录才可以跑起来

属性

| 名称 | 类型 | 必填 | 描述 | | :---- |:---- |:---- |:---- | | libPath | string| true | foxit库地址 | | license | object| false | foxitSDK密钥 | | resourceUrl| string| true | 远程加密的pdf文件地址 | | options | object| true | 用与解密的密钥 | | i18n | object| false | 多语言配置 | | loadScriptList | Array | false | 远程PDF-SDK路径 |

远程PSF-SDK loadScriptList: Array

默认值: loadScriptList: [ 'http://eftcdn.exexm.com/foxit-lib/preload-jr-worker.js', 'http://eftcdn.exexm.com/foxit-lib/UIExtension.full.js']

foxitSDK license:Object

| 属性 | 描述 | | :---- |:---- | | licenseSN | 你的 licenseSN | | licenseKey | 你的 licenseKey |

解密密钥 options:Object

| 属性 | 描述 | | :---- |:---- | | fileId | 文件id | | subFilter | 你的 subFilter | | initialKey | 你的 initialKey |

i18n:Object

默认值: zh-CN

| 属性 | 描述 | 示例| | :---- |:---- |:---- | | absolutePath | 语言包路径 | './foxit-lib/locales/zh-CN'| | lng | 选择的语种 | 'zh-CN'|

国际化

关于更多语言包详情可以访问: 国际化

Vue中使用示例

<template>
  <div id="app">
    <exe-pdf-viewer 
    :options="options"
    :lib-path="libPath"
    :load-script-list="loadScriptList"
    :resource-url="resourceUrl"/>
  </div>
</template>

<script>
export default {
  name: 'app',
  data() {
    return {
      libPath: 'http://www.cdn.com/foxit-lib/', // 资源库地址
      resourceUrl: 'http://www.cdn.com/public/foxit_drm_encrypt.pdf', // pdf 路径
      i18n: {
        absolutePath: 'http:xxx..', // 语言包路径
        lng: 'zh-CN' // 选择的语言
      },
      loadScriptList: ['http://www.cnd.com/a.js','http://www.cnd.com/b.js',],
      options: {
          fileId: 'cw_159644401293632', // 文件id
          subFilter: 'wDbkPg30',  // filter 参数
          initialKey: 'cQmublbZIy374kJOF' // key 参数
      }
    }
  },
}
</script>

效果

预览图