0

I'm using Laravel PHP framework along with wkhtmltopdf to generate PDF documents from HTML. Everything works smoothly, but I'm struggling to display page numbers on the generated PDF. I've searched through the documentation and various forums but couldn't find a clear solution.

How to do page numbering in header/footer htmls with wkhtmltopdf? i tried this but i got this instead , (The process has been signaled with signal "11")

3
  • How are you generating the pdf? Show some code. Do you use a class like mikehaertl\wkhtmlto or call the binary directly? Commented Apr 25, 2024 at 14:11
  • $pdf = \PDF::setPaper('A4' ,'portrait')->setOptions(['header-right' => 'Page [page]']) ->loadView('pdf/generic-report-pdf', compact('supplier', 'data', 'request', 'sectionSums', 'params')); return $this->download($pdf->output(), $reportConfig->name . '-' . date('Y-m-d_H:i') . '.pdf'); Commented Apr 25, 2024 at 15:20
  • Add that code to your question please and use formatting Commented Apr 26, 2024 at 9:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.