Home > Software engineering >  I am exporting PDF from HTML using Baryryvdh/laravel-snappy it's working but zooming out the pd
I am exporting PDF from HTML using Baryryvdh/laravel-snappy it's working but zooming out the pd

Time:01-19

I am using barryvdh/laravel-snappy using a windows machine. this is my code in controller:

 $pdf = \Barryvdh\Snappy\Facades\SnappyPdf::loadHTML($req->name)->setPaper('a4')->setOption('margin-bottom, 0)->save(rand().'.pdf');

the problem is that the file is creating small in a4 size as the given screenshot: enter image description here

CodePudding user response:

$pdf = \Barryvdh\Snappy\Facades\SnappyPdf::loadHTML($req->name)->setPaper('a4')->setOption('zoom', 1,2822)->save(rand().'.pdf');
  • Related