0

I am using mpdf for dynamic PDF generation. I am stuck in a situation were header should be called on some specific pages like if I have 10 pages then it should be called on pages 5, 6, 7 and 9.

How to achieve this?

hakre
  • 193,403
  • 52
  • 435
  • 836
Ajay Kadyan
  • 1,081
  • 2
  • 13
  • 36

1 Answers1

0

I am not sure but see below URL i think it is very help full to you

Header in PDF page using DOMPDF in PHP

Or Try this

// your dompdf setup

$dompdf = new DOMPDF();

// add the header
$canvas = $dompdf->get_canvas();
$font = Font_Metrics::get_font("helvetica", "bold");

// the same call as in my previous example
$canvas->page_text(72, 18, "Header: {PAGE_NUM} of {PAGE_COUNT}",
                   $font, 6, array(0,0,0));

$dompdf->load_html($html);
Community
  • 1
  • 1
Abid Hussain
  • 7,724
  • 3
  • 35
  • 53