wkhtmltopdf style table of contents

你。 提交于 2019-12-24 06:11:28

问题


I'm wondering how i can go about reducing the font size on the generated table of contents.

I've read and reread their documentation here: https://wkhtmltopdf.org/usage/wkhtmltopdf.txt

The bit i'm confused on is:

The generated XML document can be viewed by dumping it to a file using the --dump-outline switch. For example:

wkhtmltopdf --dump-outline toc.xml http://qt-project.org/doc/qt-4.8/qstring.html qstring.pdf

I'm having difficulty understanding how to translate to my own project, and what do they mean by this part of the command:

http://qt-project.org/doc/qt-4.8/qstring.html qstring.pdf

回答1:


If you want to change the default table of content (HTML and / or CSS styles), you can use the xsl-style-sheet parameter to specify a custom XLS stylesheet.

In your custom XLS you can add any HTML tag you need.

You can find an example of the default XLS file here. For your information, le XLS is generated from the tocstylesheet.cc file (see here).



来源:https://stackoverflow.com/questions/48016246/wkhtmltopdf-style-table-of-contents

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!