added pdf template and other invoice improvements (#1693)

This commit is contained in:
Kevin Papst
2020-05-10 16:19:59 +02:00
committed by GitHub
parent 4e1ffedc20
commit e3749c8e8f
45 changed files with 561 additions and 89 deletions

View File

@@ -27,12 +27,14 @@ class MPdfConverter implements HtmlToPdfConverter
/**
* @param string $html
* @param array $options
* @return mixed|string
* @throws \Mpdf\MpdfException
*/
public function convertToPdf(string $html)
public function convertToPdf(string $html, array $options = [])
{
$mpdf = new Mpdf(['tempDir' => $this->cacheDirectory]);
$options = array_merge($options, ['tempDir' => $this->cacheDirectory]);
$mpdf = new Mpdf($options);
$mpdf->creator = Constants::SOFTWARE;
// some OS do not follow the PHP default settings