回答編集履歴
1
追加
test
CHANGED
@@ -1,4 +1,26 @@
|
|
1
1
|
```ここに言語を入力
|
2
|
+
|
3
|
+
document.querySelector("#myPdf02").addEventListener("change", function(e){
|
4
|
+
|
5
|
+
const file = e.target.files[0];
|
6
|
+
|
7
|
+
const filereader = new FileReader();
|
8
|
+
|
9
|
+
filereader.addEventListener("load",function(event){
|
10
|
+
|
11
|
+
document.querySelector('#preview02').setAttribute("src", event.target.result);
|
12
|
+
|
13
|
+
});
|
14
|
+
|
15
|
+
filereader.readAsDataURL(file);//実際にファイル内容を読み込むための記述
|
16
|
+
|
17
|
+
});
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
2
24
|
|
3
25
|
// Loaded via <script> tag, create shortcut to access PDF.js exports.
|
4
26
|
|
@@ -77,3 +99,17 @@
|
|
77
99
|
});
|
78
100
|
|
79
101
|
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
html
|
106
|
+
|
107
|
+
```ここに言語を入力
|
108
|
+
|
109
|
+
<input type="file" name="file" id="myPdf01" accept=".png, .jpg, .jpeg, .pdf, .doc" capture="camera">
|
110
|
+
|
111
|
+
<img src="" alt="" id="preview01" cmanOMat="move"></img>
|
112
|
+
|
113
|
+
<canvas id="pdfViewer01" cmanOMat="move"></canvas>
|
114
|
+
|
115
|
+
```
|