使用 Ruby on Rails 的 Wicked PDF 中的模板选项
我想知道,我们可以使用 pdf 文件作为模板,使用 Ruby on Rails 使用 WickedPDF 编写内容吗?这意味着我将访问带有页眉和页脚的 PDF 文件,WickedPdf 将使用该模板在其上写入文本。
https://github.com/mileszs/wicked_pdf
谢谢 尼尚特
I would like to know , can we use a pdf file as template to write the content using WickedPDF using Ruby on Rails. That means i will be accessing a PDF file with Header and footer on it and WickedPdf will use that template to write text on it.
https://github.com/mileszs/wicked_pdf
Thanks
Nishant
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您可以像 Rails 中的任何标准视图一样编写模板,即
html.erb
或haml
,并且这将作为可下载的 PDF 提供给用户。如果您创建视图(正如我详细信息请参阅您之前的 SO 问题),并将该视图传递给 WickedPDF,您将把图像上的文本输出作为 PDF。
No, you write your template like any standard view in Rails, i.e.
html.erb
orhaml
, and this will be served up as a downloadable PDF to the user.If you create your view (as I detailed in your earlier SO question), and pass that view to WickedPDF, you will have your text-on image output served as a PDF.