문제

I have a 'report' with more than 30 pages. I need to place the mPDF ToC at the 3th page but I need that following page to be showed as 4th page at ToC, not 3th page as mPDF does.

Now I have:

Page - Subject
01 - Front
02 - Notes
03 - ToC <<<< Plz, note the page number
04 - First useful topic
05 - [Other]

But my ToC is showed this way:

First Useful Topic ............... 03
[Other]........................... 04

The counting is clearly wrong. I need it to be:

First Useful Topic ............... 04
[Other]........................... 05

How can I accomplish it in mPDF, please?

Thank you so much.

도움이 되었습니까?

해결책

I assume you're simply inserting your TOC as follows:

$mpdf->TOCpagebreak();

You can reset the page number of 4 using

$mpdf->WriteHTML('<pagebreak resetpagenum="4" suppress="off" />');

right before you write the content for page 4

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top