Skip to content

Commit 94d45d6

Browse files
committed
Expanded supported wkhtmltopdf options
1 parent 0476360 commit 94d45d6

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

src/Engine/Convert/WkHtmlToPdf.php

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,36 @@ class WkHtmlToPdf extends EngineBase {
6868
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
6969
'default' => '10mm',
7070
),
71+
array(
72+
'name' => 'footer-line',
73+
'description' => 'Display line above the footer',
74+
'mode' => Shell::SHELL_ARG_BOOL_DBL,
75+
),
76+
array(
77+
'name' => 'footer-font-size',
78+
'description' => 'Set footer font size (default 12)',
79+
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
80+
),
81+
array(
82+
'name' => 'footer-html',
83+
'description' => 'Adds a html footer (must provide URL, not HTML)',
84+
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
85+
),
86+
array(
87+
'name' => 'footer-left',
88+
'description' => 'Left aligned footer text',
89+
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
90+
),
91+
array(
92+
'name' => 'footer-center',
93+
'description' => 'Centered footer text',
94+
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
95+
),
96+
array(
97+
'name' => 'footer-right',
98+
'description' => 'Right aligned footer text',
99+
'mode' => Shell::SHELL_ARG_BASIC_DBL_NOEQUAL,
100+
),
71101
);
72102

73103
public function getConvertFileShell($source, &$destination) {
@@ -105,14 +135,7 @@ public function getVersionInfo() {
105135
}
106136

107137
public function isAvailable() {
108-
$bin = realpath(__DIR__ . '/../../../../../bin');
109-
if (is_dir($bin) && is_file("$bin/wkhtmltopdf-0.11.0rc1-amd64")) {
110-
$this->cmd = "$bin/wkhtmltopdf-0.11.0rc1-amd64";
111-
}
112-
else {
113-
$this->cmd = $this->shellWhich('wkhtmltopdf');
114-
}
115-
138+
$this->cmd = $this->shellWhich('wkhtmltopdf');
116139
return isset($this->cmd);
117140
}
118141
}

0 commit comments

Comments
 (0)