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

How to create index list? #1139

Closed
oussama-he opened this issue Jun 13, 2020 · 3 comments
Closed

How to create index list? #1139

oussama-he opened this issue Jun 13, 2020 · 3 comments

Comments

@oussama-he
Copy link

I would like to create a pdf from HTML and I want the pdf result to have an index list or index table like in the picture below:

Screenshot at 2020-06-13 11-33-03

How can I do this using the weasyprint lib.

@liZe
Copy link
Member

liZe commented Jun 13, 2020

Hello!

You’ll find different solutions in #23, or you can take a look at the report sample.

@liZe liZe closed this as completed Jun 13, 2020
@Tontyna
Copy link
Contributor

Tontyna commented Jun 13, 2020

@oussama-he, if you just want an outline in your PDF there is no need to do anything at all -- it is generated automatically, containing the headings of your document.

@liZe
Copy link
Member

liZe commented Jun 13, 2020

@oussama-he, if you just want an outline in your PDF there is no need to do anything at all -- it is generated automatically, containing the headings of your document.

Of course, @Tontyna is right. If you want to have bookmarks in your PDF reader, like in your screenshot, it’s automatically done by WeasyPrint with h1 to h6 tags, or manually with the bookmark-* properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants