Skip to content

Instantly share code, notes, and snippets.

@robzolkos
Created November 7, 2011 03:20
Show Gist options
  • Save robzolkos/1344111 to your computer and use it in GitHub Desktop.
Save robzolkos/1344111 to your computer and use it in GitHub Desktop.
Prawn error with image cells
@pdf = Prawn::Document.new(:margin=>0)
image = "#{Prawn::BASEDIR}/data/images/prawn.png"
@imgcell = Prawn::Table::Cell.make(@pdf, :image=>image)
ArgumentError: Content type not recognized: nil
from /Users/rzolkos/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.12.0/lib/prawn/table/cell.rb:127:in `make'
from (irb):6
from /Users/rzolkos/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'
@robzolkos
Copy link
Author

This error occured due to using v0.12 of the gem instead of master. Master has support for images inside table cells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment