Looking at the wkhtmltopdf documentation, it looks like you need to specify a unit for custom page sizes, for example:
render :pdf => 'file_name', :page_height => '5in', :page_width => '7in'
This was merged into the trunk of wkhtmltopdf in December 2009, so you'll want to make sure you have a fairly new version of the binary (0.9.9 or higher should be fine) if it still doesn't work.
source share