【问题标题】:How to style table of content with wkhtmltopdf?如何使用 wkhtmltopdf 设置目录样式?
【发布时间】:2019-02-08 08:21:10
【问题描述】:

在实体打印模块和 wkhtmltopdf 引擎的帮助下,我从 HTML 生成了一个 pdf 文件。我有一个问题,我无法为目录设置主题。 通过类似的问题here 我想我需要通过自定义 xsl 表来完成,但我不知道如何设置它。

我在 /* TOC 处理下的 PhpWkhtmlToPdf.php 中尝试过 */

$this->getPrintObject()->setOptions(['xsl-style-sheet' => 'link to xsl sheet']);

$options[] = ['xsl-style-sheet' => 'link to xsl sheet']; 

但它不起作用。

我在 entity-print.css 中的所有格式都会影响整个生成的文档,但不会影响内容表。请帮忙。

【问题讨论】:

    标签: drupal-8 wkhtmltopdf


    【解决方案1】:
    $this->getPrintObject()->addToc(array('xsl-style-sheet' => '../entity_print/files/custom-toc.xsl'));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-30
      • 1970-01-01
      • 2015-09-02
      • 2012-05-05
      • 2011-07-19
      • 2019-05-31
      • 2013-05-25
      相关资源
      最近更新 更多