Skip to content

Commit 025d746

Browse files
committed
improved example
1 parent 74a81b3 commit 025d746

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ $tex->setTmpDir('./runtime/'); // <- where to build the latex files
1515
$pdf = $tex->renderPdf('simple-report', [ // <- which template to use (file ending .tex.twig)
1616
'title' => 'My Custom Title', // <- variables to set
1717
'author' => 'Me!',
18-
]);
18+
]);
19+
// output / save the pdf with
20+
file_put_contents('main.pdf', $pdf);
21+
// or echo with fitting header
22+
header("Content-type:application/pdf");
23+
echo $pdf;
1924
```
2025

2126
# Contribute

0 commit comments

Comments
 (0)