On Sat, 17 Dec 2011 02:11:33 +0900, Dan Quach wrote:
> K Clair wrote in post #1036592:
>> In my research, there are two main ways to generate a PDF:
>>
>>  1. use an html -> pdf generator such as wkhtmltopdf or princexml 
>> (and
>>  invoke the command line from ruby)
>>
>>  2. use another library (Prawn seems to be the big one for ruby). 
>> You'll
>>  have to learn the markup syntax for Prawn, but I think if you're
>> willing
>>  to get over that hurdle then you have more control than if you used 
>> an
>>  html-> pdf generator.
>>
>>  -Kristina
>
> Interesting.  Do the html to pdf generators use the html 5 standard 
> when
> rendering?  I'm curious how they do this since each browser 
> implements
> like css styles very differently.

 Each one does it differently, so you'd have to look at the individual 
 specs.  I don't remember the details anymore, but I remember when I was 
 researching this that wkhtmltopdf and princexml support different css 
 rules.  One example I can remember is that until the most recent 
 release, princexml didn't support the 'nowrap' property.  Princexml also 
 makes heavy use of some print media specific css things, such as @page, 
 and css can be used to change the flow of the page.

 Not sure about html5!

 -Kristina