Created
July 12, 2010 03:37
-
-
Save andreferraro/472105 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pdf.stroke_color "CCCCCC" | |
pdf.font "Helvetica", :size => 14 | |
pdf.text @uf.uf.to_s, :size => 30, :style => :bold | |
pdf.stroke_horizontal_rule | |
pdf.move_down(20) | |
pdf.text "Id: " + @uf.id.to_s | |
pdf.text "Uf: " + @uf.uf.to_s | |
pdf.text "Sigla: " + @uf.sigla.to_s | |
if [email protected]_content_type.index("image/gif") && (@uf.bandeira_content_type.index("image/png") || @uf.bandeira_content_type.index("image/jpeg") || @uf.bandeira_content_type.index("image/jpg")) | |
pdf.image "#{RAILS_ROOT}/public/images/" + @uf.bandeira.to_s.gsub(/\?.[0-9]*/,""), :at => [500, 480] | |
end | |
pdf.bounding_box([pdf.bounds.absolute_right()-80, pdf.bounds.absolute_bottom()-10], :width => 300) do | |
pdf.text "Página: " + pdf.page_count.to_s, :size => 8 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PDF to image formats rendering support, like converting PDF to jpeg, jpg, png and gif. How about bmp and tiff?