Wicked pdf 不渲染页脚

Wicked pdf not rendering footer

我正在开发一个使用 wicked_pdf 的项目,我有一个页脚部分,我在 pdf 生成中引用了它:

format.pdf do
  render :pdf => "document",
    :footer => {
      :html => {
        :template => "/document/_footer"
      }
  }
end

当我 运行 此页脚未显示在 pdf 上时,但如果我在模板中有 byebugs,我可以看到页脚正在处理,但未应用于我的文档。如果能帮助解决这个问题,我们将不胜感激。

尝试设置边距:

format.pdf do
  render pdf: 'document',
         footer: { html: { template:"/document/_footer" },
         margin: { top: 10, left: 20, bottom: 15, right: 20 }
end