如何在Rails中呈现pdf格式 [英] How to render format in pdf in rails
本文介绍了如何在Rails中呈现pdf格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望表格以 pdf 格式显示.
I want the the table to be displayed in pdf format .
我们正在使用
format.html
format.json{render json: @user}
等用于生成html,json格式
etc for generating html ,json format
类似地
- 我想将页面呈现为pdf.
那么如果可能的话,有什么步骤呢?
so what steps are there if it is possible in rails???
推荐答案
另一件事是大虾.
它似乎更健壮并支持复杂情况.因此,您可以选择此选项以处理复杂的问题.在此处获取 http://prawn.majesticseacreature.com/manual.pdf .
It seems more robust and support complex situations. So you may choose this to work with something sophisticated. Get the http://prawn.majesticseacreature.com/manual.pdf here.
这篇关于如何在Rails中呈现pdf格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文