http://www.analogpixel.org/pages/create/ is a webpage that pops up random words and pictures meant for idea generation / brain storming . Problem is i’m going to be on a plane for 8 hours next month and won’t have access to wifi (I don’t think so.) So I created a version of create that outputs a PDF of roughly the same stuff (minus the medium and illustration friday boxes)
http://www.analogpixel.org/pages/createpdf/?numpages=3
This was written in ruby with Sinatra and Prawn
To output a pdf in Sinatra using Prawn you do something like this:
get '/pages/createpdf/' do
content_type 'application/pdf'
pdf = Prawn::Document.new :page_layout => :landscape do
text "some text"
end
pdf.render
end
To load an image from a url instead of a file in Prawn you would:
require "open-uri"
..
..
image open("http://urltopic/pic.jpg"), :width => 170, :height => 170