Plone collective.sendaspdf 忽略重氮主题

Plone collective.sendaspdf ignores diazo theme

我有一个 plone-site,我想在 wkhtmltopdf 的基础上为 PDF-generation 使用 collective.htmltopdf

然而,当我打印我的网站时,重氮主题没有得到应用。 header HTTP_X_THEME_ENABLED 正确传递给重氮。

rules.xml 中没有条件。有问题的页面是 public。我尝试了 HTTPS 和 HTTP。

为什么重氮规则不适用于 wkhtmltopdf

更新我

在我的工作站上使用 wkhtmltopdf 时,上述情况并非如此。闻起来像路由...

这是 collective.wkhtmltopdf 处理页面源的方式:它从视图(而不是通过 https)生成,并在那里丢失有关主题的信息。当我将 url-source 快速破解到源中时,一切都按预期工作。

collective.sendaspdf-3.0-py2.7.egg/collective/sendaspdf/transforms/wk.py

    # Run the wkhtmltopdf command.
    args = [wk_command,
            '--disable-javascript',
            '--encoding',
            'utf-8',
            'http://ww2.mypage.com',
            #'file://%s/%s' % (export_dir, html_filename),
            '%s/%s' % (export_dir, filename)]

这需要拉取请求...