2016-10-28 64 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