search for: margins_cm

Displaying 1 result from an estimated 1 matches for "margins_cm".

Did you mean: margins_
2006 Jun 13
2
Top margin on PDF generated with PDF::Writer
...ten a method that uses PDF::Writer to generate a PDF document with some images and text. This is the code on my controller: def pdf gen_pdf redirect_to("#{@request.relative_url_root}/pdf/cupones.pdf") end private def gen_pdf pdf = PDF::Writer.new(:paper => "A4") pdf.margins_cm(0) pdf.start_columns(2, 0) pdf.select_font "Times-Roman" 10.times do pdf.open_object do |card| pdf.save_state pdf.image "public/images/card.png", :justification => :left, :width => PDF::Writer.cm2pts(10.5), :height => PDF::Writer.cm2pts(6) #p...