Forum Samples, Tips and Tricks

Rubyonrails accessory

khelll
i found this while i was navigating the web

http://sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on-rails

it's how to call prince from within rails

but it has a defect that i couldn't catch yet :

in prince.rb

when passing a UTF-8 string in line 68

pdf.puts(string)

the outputed pdf is garbled , which i think it's due to passing it.

is there any suggestion to make it accept utf8

?
mikeday
I'm not sure what the situation is with this Ruby library, and would recommend contacting its developer directly to see what is going on.
chenxee
same problem for me before. i changed template file to iso8859 encoding and it works for me.