ofd-view 0.2.20 → 0.2.22

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
@@ -1,4 +1,85 @@
1
- [//]: # (# ofdview)
1
+ # ofdview
2
+
3
+
4
+
5
+ ## vue使用
6
+
7
+
8
+
9
+ ### npm 安装
10
+
11
+
12
+
13
+ ```
14
+
15
+
16
+ npm i ofd-view -S
17
+
18
+
19
+ ```
20
+
21
+
22
+
23
+ 在 main.js 中写入以下内容:
24
+
25
+
26
+
27
+ ```
28
+
29
+
30
+ import OfdView from "ofd-view";
31
+
32
+
33
+ import 'ofd-view/lib/viewer.css'
34
+
35
+
36
+
37
+ Vue.use(OfdView);
38
+
39
+
40
+ ```
41
+
42
+
43
+
44
+ 在 静态页 index.html 中声明dir为ltr
45
+
46
+
47
+
48
+ ```
49
+
50
+
51
+ dir="ltr"
52
+
53
+
54
+ ```
55
+
56
+ ### 组件参数
57
+
58
+ | 参数 | 说明 | 是否必填 |
59
+ |------------------------------|---------------------------------------------|------|
60
+ | file | OFD文件。支持File、ArrayBuffer及url,与fileBase64二选一 | 是 |
61
+ | fileBase64 | OFD文件base64,与file二选一 | 是 |
62
+ | mem | 核心库,按demo方式 | 是 |
63
+ | secret | 核心库授权 | 否 |
64
+ | digest | 核心库授权密钥 | 否 |
65
+ | sidebar-force-open | 侧边栏默认打开 | 否 |
66
+ | signature-viewer-force-check | 侧边栏中的签名签章默认验签 | 否 |
67
+ | water_text | 水印内容 | 否 |
68
+ | canOpen | 是否允许通过按钮打开ofd文件,默认false | 否 |
69
+ | canDownload | 是否允许通过按钮下载ofd文件,默认false | 否 |
70
+ | canPrint | 是否允许通过按钮打印ofd文件,默认false | 否 |
71
+ | displayToolbar | 是否显示操作栏,默认true | 否 |
72
+ | defaultScale | 默认比例值,支持 page-fit,page-width,page-height,auto 以及倍数如 1.5 之类 | 否 |
73
+
74
+
75
+ [demo](https://github.com/DLTech21/ofd-vue-demo)
76
+
77
+
78
+
79
+
80
+ ![示例](https://cdn.jsdelivr.net/npm/ofd-view@0.1.17/img.png)
81
+
82
+ [//]: # (# vue-pdfjs-view)
2
83
 
3
84
  [//]: # ()
4
85
  [//]: # ()
@@ -13,7 +94,7 @@
13
94
  [//]: # (```)
14
95
 
15
96
  [//]: # ()
16
- [//]: # (npm i ofd-view -S)
97
+ [//]: # (npm i vue-pdfjs-view -S)
17
98
 
18
99
  [//]: # ()
19
100
  [//]: # (```)
@@ -27,14 +108,14 @@
27
108
  [//]: # (```)
28
109
 
29
110
  [//]: # ()
30
- [//]: # (import OfdView from "ofd-view";)
111
+ [//]: # (import pdfview from "vue-pdfjs-view";)
31
112
 
32
- [//]: # ()
33
- [//]: # (import 'ofd-view/lib/viewer.css')
113
+ [//]: # (import 'vue-pdfjs-view/lib/viewer.css')
34
114
 
35
115
  [//]: # ()
36
116
  [//]: # ()
37
- [//]: # (Vue.use(OfdView);)
117
+ [//]: # ()
118
+ [//]: # (Vue.use(pdfview);)
38
119
 
39
120
  [//]: # ()
40
121
  [//]: # (```)
@@ -54,60 +135,20 @@
54
135
  [//]: # (```)
55
136
 
56
137
  [//]: # ()
57
- [//]: # ()
58
- [//]: # ([demo](https://github.com/DLTech21/ofd-vue-demo))
59
-
60
- [//]: # ()
61
- [//]: # ()
62
- [//]: # ()
63
- [//]: # (![示例](https://cdn.jsdelivr.net/npm/ofd-view@0.1.17/img.png))
64
-
65
- # mupdf-view
66
-
67
-
68
- ## vue使用
69
-
70
-
71
- ### npm 安装
72
-
73
-
74
- ```
138
+ [//]: # (```aiignore)
75
139
 
76
- npm i mupdf-view -S
140
+ [//]: # (<pdf-view :url="pdfurl" :c-map-src="cMapSrc" />)
77
141
 
78
- ```
79
-
80
-
81
- 在 main.js 中写入以下内容:
82
-
83
-
84
- ```
85
-
86
- import mupdfView from "mupdf-view";
87
- import 'mupdf-view/lib/viewer.css'
88
-
89
-
90
-
91
- Vue.use(mupdfView);
92
-
93
- ```
94
-
95
-
96
- 在 静态页 index.html 中声明dir为ltr
97
-
98
-
99
- ```
142
+ [//]: # (```)
100
143
 
101
- dir="ltr"
144
+ [//]: # ()
145
+ [//]: # (配置参数)
102
146
 
103
- ```
147
+ [//]: # ()
148
+ [//]: # (| 参数 | 说明 | 类型 | 示例 | 默认值 |)
104
149
 
150
+ [//]: # (| --- |-------|--------| --- |-----|)
105
151
 
106
- 配置参数
152
+ [//]: # (| url | pdf文件 | url | | |)
107
153
 
108
- | 参数 | 说明 | 类型 | 示例 | 默认值 |
109
- | --- |-------------------------| --- | --- |-----|
110
- | file | pdf文件 | url | | |
111
- | canDownload | 是否可下载 | boolean | | false |
112
- | canPrint | 是否可打印 | boolean | | false |
113
- | canOpen | 是否可打开新文档 | boolean | | false |
154
+ [//]: # (| c-map-src | 字体 | string | | https://cdn.jsdelivr.net/npm/pdfjs-dist@2.11.338/cmaps/ |)