在我的Rails應用程序中,我試圖用PDF-Kit
生成一個PDF文件。 我正在嘗試添加頁腳到PDF。每當我嘗試添加幫助程序方法:footer_html
時,我都會收到錯誤消息,但是我可以在不使用PDF的情況下生成PDF。在控制檯上Rails-PDFKit Footer不能正常工作
錯誤是,
Error: Failed loading page http:/home/rmed179lt/workspace/ror/ROOT_PROJECT/views/mlap_reports/footer.html?page=1§ion=&subsection=&frompage=1&subsubsection=&topage=1&webpage=foobar&time=8:50 PM&date=15/02/16 (sometimes it will work just to ignore this error with --ignore-load-errors) QPaintDevice: Cannot destroy paint device that is being painted
kit = PDFKit.new(html, page_size: 'Letter', :footer_html => "/mlap_reports/footer.html")
我也試過,
kit = PDFKit.new(html, page_size: 'Letter', :footer_html => "/mlap_reports/footer")
我的頁腳位於app/views/mlap_reports/footer.html
。任何想法如何解決這個問題?