Skip to content

Commit c95f14c

Browse files
authored
Merge pull request #10 from row-bloom/8-set-default_font_size-margin_header-margin_footer
more instantiation config entries
2 parents b57bc01 + bd6305c commit c95f14c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/MpdfRenderer.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ public function render(Html $html, Css $css, Options $options, Config $config =
5252
$this->options = $options;
5353
$this->config = $config ?? $this->config;
5454

55-
$this->mpdf = new Mpdf($this->getMargin());
55+
$this->mpdf = new Mpdf($this->getMargin() + [
56+
'default_font_size' => 12,
57+
'margin_header' => 5,
58+
'margin_footer' => 5,
59+
// 'default_font' => '',
60+
]);
5661

5762
$this->setPageFormat();
5863
$this->setHeaderAndFooter();
@@ -103,8 +108,6 @@ private function getMargin(): array
103108
'margin_right' => $margin->getRaw('marginRight'),
104109
'margin_bottom' => $margin->getRaw('marginBottom'),
105110
'margin_left' => $margin->getRaw('marginLeft'),
106-
// 'margin_header' => 0,
107-
// 'margin_footer' => 0,
108111
];
109112
}
110113

0 commit comments

Comments
 (0)