File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,24 @@ You can chain the methods:
9696return \WeasyPrint::loadFile('https://laravel.com/docs')->inline('laravel.pdf');
9797```
9898
99- You can change the orientation and paper size
99+ You can change the footer, orientation and paper size using the ` @page ` in you stylesheets
100100
101101``` php
102- \WeasyPrint::loadHTML($html)->setPaper('a4')->setOrientation('landscape')->setOption('margin-bottom', 0)->save('myfile.pdf')
102+ @page {
103+ size: A4;
104+ margin: 1cm;
105+ @bottom-right{
106+ content: "Page " counter(page) " of " counter(pages);
107+ }
108+ }
109+
110+ ```
111+
112+ ``` php
113+ @page {
114+ size: A6 landscape;
115+ margin: 1cm;
116+ }
103117```
104118
105119If you need the output as a string, you can get the rendered PDF with the output() function, so you can save/output it yourself.
You can’t perform that action at this time.
0 commit comments