質問編集履歴
1
Added Code
test
CHANGED
File without changes
|
test
CHANGED
@@ -31,3 +31,39 @@
|
|
31
31
|
document.write(xmlHttp.responseText)
|
32
32
|
|
33
33
|
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
```javascript
|
38
|
+
|
39
|
+
// wkhtmltopdfの処理
|
40
|
+
|
41
|
+
// babelでes5へ変換している
|
42
|
+
|
43
|
+
const url = "http://localhost:8080"
|
44
|
+
|
45
|
+
wkhtmltopdf(url, {
|
46
|
+
|
47
|
+
'pageSize': 'A3', //用紙サイズ
|
48
|
+
|
49
|
+
'dpi': '300', // 解像度
|
50
|
+
|
51
|
+
'header-html': `${url}/header.html`,
|
52
|
+
|
53
|
+
'footer-html': `${url}/footer.html`,
|
54
|
+
|
55
|
+
'output': "./pdf/output.pdf", // 出力ファイル名
|
56
|
+
|
57
|
+
'encoding': 'utf8', // 日本語対応,
|
58
|
+
|
59
|
+
'T': '5',
|
60
|
+
|
61
|
+
'B': '5',
|
62
|
+
|
63
|
+
'L': '5',
|
64
|
+
|
65
|
+
'R': '5'
|
66
|
+
|
67
|
+
})
|
68
|
+
|
69
|
+
```
|