-
Notifications
You must be signed in to change notification settings - Fork 21
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
When I set 'page-style' to 'book', I cannot get the correct TOC page number in pdf file #433
Comments
I don't have much experience with weasyprint. I expect the thing to do is make a tiny book with four pages or something, verify that weasyprint gets it wrong, then examine the HTML to work out what it is that weasyprint doesn't like. Or what is missing in the If you can work out what's confusing weasyprint, I'm happy to try to fix it in the generated HTML. |
Thanks for replying so quickly. I will try it in your way. If I need your help I will let you konw. Thank you again. And could you recommend an open source Paged Media PDF generator to me ? |
I'v made a tiny book, and I haven't change any parameters except and the pdf file was generated by: In the same way, I set the parameter PageStyle-article.html.txt |
Thank you for the test cases. I've reproduced the problem. The only significant difference between the HTML files is the class used on the HTML element. Apparently, there's something in the CSS associated with the With a few minutes of binary searching through the CSS for rules that apply in
Apparently weasyprint doesn't like that. |
When set Thank you very much. |
Glad you got it working! |
I use weasyprint to generate my pdf file. When I use
<xsl:param name="page-style" as="xs:string" select="'article'"/>
, I can get my pdf file correctly with TOC and page number.But when I change
article
tobook
, I cannot get the correct TOC with page number. All the page numbers are '0' in toc, I want to know how to correct it.The text was updated successfully, but these errors were encountered: