我推荐一个叫做prawn的宝石(gem):http://prawn.majesticseacreature.com/
我之前用过它,结果很不错。
有一个很好的替代品oo:
http://railscasts.com/episodes/220-pdfkit