Właśnie użyłem mPDF na moim projekcie, a teraz utknąłem na tym problemie. Najpierw opiszę moją strukturę PDF:mPDF wyłącz numer strony, nagłówek i stopkę na pierwszej stronie
- Pierwsza strona to strona tytułowa.
- Druga strona to strona spisu treści.
- Trzecia strona to strona z treścią.
Więc problem jest:
- Istnieje nagłówek, stopkę, numer strony na stronie tytułowej i strony TOC. Jak mogę to usunąć?
- Numer strony treści rozpoczyna się bez 3. Jak zresetować go, aby stał się numerem 1?
Poniżej znajduje się kod służy do zawierać nagłówek i stopkę
$mpdf->SetHeader('{DATE j-m-Y}|{PAGENO}/2|My document');
$mpdf->SetFooter('{PAGENO}'); /* defines footer for Odd and Even Pages - placed at Outer margin */
$mpdf->SetFooter(array(
'L' => array(
'content' => 'Text to go on the left',
'font-family' => 'sans-serif',
'font-style' => 'B', /* blank, B, I, or BI */
'font-size' => '10', /* in pts */
),
'C' => array(
'content' => '- {PAGENO} -',
'font-family' => 'serif',
'font-style' => 'BI',
'font-size' => '18', /* gives default */
),
'R' => array(
'content' => 'Printed @ {DATE j-m-Y H:m}',
'font-family' => 'monospace',
'font-style' => '',
'font-size' => '10',
),
'line' => 1, /* 1 to include line below header/above footer */
), 'E' /* defines footer for Even Pages */
);
a dla strony TOC, dodaję ten tag w html
<tocpagebreak />
Mam numer strony startowej z drugiej strony, jak zacząć w mpdf .. –