[英]How do I change the font for the table of contents in a PDF generated with DDX file?
[英]How can I change a font style for table of contents?
在我的Drupal 8網站上,我正在從html代碼生成pdf文件。 這是借助Entity Print模塊與wkhtmltopdf引擎結合完成的。 在界面中,我可以選擇生成目錄的選項。 但是現在對我來說,問題是我不知道如何主題目錄,即我想分配“ Times New Roman”字體樣式。
在entity_print / css文件夾下的entity-print.css中,我已指定
@font-face {
font-family: "Times New Roman", sans-serif;
}
body {
font-family: "Times New Roman", sans-serif;
font-size: 17px;
color: #000000;
line-height: 1.6;
}
它影響生成的文檔本身,但不影響目錄
更新:entry-print.html.twig對我來說如下所示:
<html>
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
{{ entity_print_css }}
</head>
<body>
<div class="page">
{% for chapter in content%}
<div class="section">
{{ chapter }}
</div>
{% endfor %}
</div>
</body>
</html>
我記得實體打印遇到這樣的問題。
我最終要做的是為我的pdf的樹枝模板添加一些內聯樣式 ,並得到了我需要的結果(在html和印刷的pdf上)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.