【发布时间】:2011-06-03 18:19:48
【问题描述】:
这是我目前所拥有的,但我需要设置边距:
def send_fax
contact = Contact.find_by_id(self.contact_id)
pdf = Prawn::Document.new
pdf.font "Times-Roman"
pdf.move_down(20)
pdf.text "ATTN: #{contact.first_name} #{contact.last_name}", :size => , :style => :bold
pdf.text "RE: #{self.subject}"
pdf.move_down(20)
pdf.text "#{self.body}"
OutboundMailer.deliver_fax_email(contact, self, pdf)
end
【问题讨论】:
-
值得注意的是,您正在寻找专门设置页边距。
标签: ruby-on-rails pdf-generation prawn