2016-10-28 61 views
0

我正在使用wicked_pdf一个项目,我有偏页脚,我在PDF生成与参考:妖兽PDF渲染不页脚

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

当我运行这个页脚不显示在pdf上,但是如果我在模板中看到了脚注,我可以看到页脚正在处理中,但未应用于我的文档。任何帮助整理这将不胜感激。

回答

0

尝试设置边距:

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