barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.59k stars 289 forks source link

How can I get my wkhtmltopdf footer to display on all pages in my Laravel project with barryvdh package? #508

Open SaraShoukry opened 1 year ago

SaraShoukry commented 1 year ago

I have a 20 pages I need to add footer to them using wkhtmltopdf footer-html, but footer not added to all pages. ` $footerHtml = view()->make('print.footer', ['job_id' => $job_id])->render();

    $pdf = PDF::loadView('print.page', ["pages" => $pages])->setPaper('a4')
        ->setOption('footer-html', $footerHtml)
        ->setOption('margin-top', 0)
        ->setOption('margin-left', 4)
        ->setOption('margin-right', 4)
        ->setOption('margin-bottom', 35);`

The footer is showing in small files but in the file with 20 page not showing

The footer shown in all pages when the pages are 4 when more than that it doesn't show