@toolspack/ttd-pdfjs 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,6 +16,17 @@
16
16
  # 发布项目
17
17
  (不能和上次版本一样) npm run lib (打包), 打包完成后,执行npm publish
18
18
 
19
+ 1. 首先2.8.335版本之前引入方式
20
+ import pdfJS from "pdfjs-dist";
21
+ import workerSrc from 'pdfjs-dist/build/pdf.worker.entry'
22
+ pdfJS.workerSrc = workerSrc;
23
+ //或者使用
24
+ import pdfJS from 'pdfjs-dist/es5/build/pdf.js'
25
+ 2. 2.8.335版本之后引入方式
26
+ // 注意导入的写法
27
+ import * as PdfJs from 'pdfjs-dist/legacy/build/pdf.js'
28
+ PdfJs.workerSrc = require('pdfjs-dist/build/pdf.worker.entry')
29
+
19
30
 
20
31
  0.0.0: pdfjs-dist2.16.105 单独打包
21
32
  0.0.1: 修复bug
package/lib/demo.html CHANGED
@@ -1 +1,8 @@
1
- <!doctype html><meta charset="utf-8"><title>ttd-pdfjs demo</title><script src="./ttd-pdfjs.umd.js"></script><script>console.log(ttd-pdfjs)</script>
1
+ <meta charset="utf-8">
2
+ <title>ttd-pdfjs demo</title>
3
+ <script src="./ttd-pdfjs.umd.js"></script>
4
+
5
+
6
+ <script>
7
+ console.log(ttd-pdfjs)
8
+ </script>