Phlip
5/11/2008 7:55:00 PM
Jordi Aragones vilella wrote:
>> require 'hpricot'
> Hi!! Thanks a lot for your answer. I'm a newbie and I still need to
> learn a lot from Ruby and his libraries...
>
> It worked fine!! And now, I will deep a bit in this library, because I
> suppose that with that one, I will be able to save some tags for my PDF
> code, isn't it? (For example, bold, underline...).
Use a SAX-style XML parser to parse your strings as XHTML. SAX means the
parser calls a method for each tag it finds, so if you bind a <b> or <u> tag
you can stream the contents into PDF.
Now google for [ruby xml sax], because I don't know what Ruby's SAX solution
is!
--
Phlip