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

@@ -45,7 +45,14 @@ final class PdfRenderer implements RendererInterface
$content = $this->twig->render('@invoice/' . basename($document->getFilename()), [
'model' => $model
]);
$content = $this->converter->convertToPdf($content);
$content = $this->converter->convertToPdf($content, [
'setAutoTopMargin' => 'pad',
'setAutoBottomMargin' => 'pad',
'margin_top' => 12,
'margin_bottom' => 8,
]);
$filename = (string) new InvoiceFilename($model);
$response = new Response($content);