Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing ToC #333

Closed
ghost opened this issue May 28, 2018 · 1 comment
Closed

Placing ToC #333

ghost opened this issue May 28, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented May 28, 2018

Hello,

I want to place the Table of Content with the createIndex() method after the heading of my document.
My Problem is, that the ToC is just overlayed of the normal content.

My html Code looks like:

<h1>Heading of the Document</h1>
<bookmark title="Summary" level="0"></bookmark>
<h1>First Chapter</h1>
<bookmark title="First Chapter" level="0"></bookmark>
<p>Content of first Chapter</p>
<h1>Second Chapter</h1>
<bookmark title="Second Chapter" level="0"></bookmark>
<p>Content of second Chapter</p>
</page>

The php Code looks like:

$this->html2pdfwriter->pdfSetDisplayMode("fullpage");
$this->html2pdfwriter->setTestTdInOnePage(false);
$this->html2pdfwriter->writeHTML($html);
$this->html2pdfwriter->createIndex("Summary",20,15,true,true,1);

The result is, that the ToC is above my Heading of the Document but I want to place it under it.

@spipu
Copy link
Owner

spipu commented Jul 31, 2018

hi,

a new parameter $marginTop will be added to the createIndex method on the next release

@spipu spipu closed this as completed Jul 31, 2018
icebird93 pushed a commit to EduBase/html2pdf that referenced this issue Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant