File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,11 @@ class Invoice
145145 */
146146 protected $ userDefinedData ;
147147
148+ /**
149+ * @var array
150+ */
151+ protected array $ paperOptions ;
152+
148153 /**
149154 * Invoice constructor.
150155 *
@@ -184,6 +189,9 @@ public function __construct($name = '')
184189 $ this ->currency_thousands_separator = config ('invoices.currency.thousands_separator ' );
185190 $ this ->currency_format = config ('invoices.currency.format ' );
186191
192+ //Paper
193+ $ this ->paperOptions = config ('invoices.paper ' );
194+
187195 $ this ->disk = config ('invoices.disk ' );
188196 $ this ->table_columns = static ::TABLE_COLUMNS ;
189197 }
@@ -257,7 +265,7 @@ public function render()
257265 $ view = View::make ($ template , ['invoice ' => $ this ]);
258266 $ html = mb_convert_encoding ($ view , 'HTML-ENTITIES ' , 'UTF-8 ' );
259267
260- $ this ->pdf = Pdf::setOption (['enable_php ' => true ])->loadHtml ($ html );
268+ $ this ->pdf = Pdf::setOption (['enable_php ' => true ])->setPaper ( $ this -> paperOptions [ ' size ' ], $ this -> paperOptions [ ' orientation ' ])-> loadHtml ($ html );
261269 $ this ->output = $ this ->pdf ->output ();
262270
263271 return $ this ;
You can’t perform that action at this time.
0 commit comments