28 Jan '16, 3pm

Hackable PDF Typesetting in Ruby with Prawn: Installing Prawn If you're running a Rails operation, LaTeX isn't...

Hackable PDF Typesetting in Ruby with Prawn: Installing Prawn If you're running a Rails operation, LaTeX isn't...

require "prawn" Prawn::Document.generate("oruby_cover.pdf") do move_down 60 image "shrimp.png", fit: [500, 400], position: :center move_cursor_to bounds.top shape_color = "008888" font "Times-Roman" fill_color shape_color fill_rectangle [0, bounds.top], bounds.width, 20 move_down 25 fill_color "000000" text "Because InDesign is for scrubs", :size => 20, :style => :italic, :align => :center bounding_box([0, bounds.top - 50], :width => bounds.width, :height => bounds.height) do move_down 380 text "using", :size => 40, :style => :italic move_up 380 fill_color shape_color fill_rectangle [0, 300], 550, 200 fill_color "FFFFFF" move_down 410 font "Times-Roman" text "Prawn", :size => 165, :align => :center fill_color "000000" font "Helvetica" draw_text "O'RUBY", :at => [0, bounds.bottom + 50], :size => 30 move_to [0, bounds.bottom + 100] font "Times-Roman" draw_text "Robert Qualls...

Full article: http://www.sitepoint.com/hackable-pdf-typesetting-in-ruby...

Tweets

Today in #Ruby, #Rails, & #Python is out!

paper.li 28 Jan '16, 12pm

Today in #Ruby, #Rails, & #Python Today in #Ruby, #Rails, & #Python, by David Young: News from Rubyists and Pythonistas Pl...