rendering pdf

Discussion in 'Ruby' started by twittwit, Jun 1, 2009.

  1. twittwit

    twittwit Guest

    hello all,

    i am new to ruby ( like two hours new! ) but i do know other
    languages. I LOVE RUBY!

    anyway, i want to code something to render my website into pdf. i have
    seen these railscasts :
    http://railscasts.com/episodes/153-pdfs-with-prawn
    http://railscasts.com/episodes/78-generating-pdf-documents

    they are super good but it seems that they are taking the elements and
    reconstruct them into pdf. I wonder is there something that can
    duplicate the webpage as it is ? ( ie, the entire layout will remain
    the same as what is seem the webpage and the only difference is that
    it is no longer html but pdf.)

    if not, can someone enlighten me how i should approach this?


    thank you all!

    bryan
     
    twittwit, Jun 1, 2009
    #1
    1. Advertising

  2. On Mon, Jun 1, 2009 at 6:15 PM, twittwit <> wrote:

    > they are super good but it seems that they are taking the elements and
    > reconstruct them into pdf. =A0I wonder is there something that can
    > duplicate =A0the webpage as it is ? ( ie, the entire layout will remain
    > the same as what is seem the webpage and the only difference is that
    > it is no longer html but pdf.)


    If it's possible to use JRuby, look into FlyingSaucer.

    -greg
     
    Gregory Brown, Jun 2, 2009
    #2
    1. Advertising

  3. Google "ruby html to pdf" gives these in the first few hits:

    http://sublog.subimage.com/2007/05/29/html-css-to-pdf-using-ruby-on-rails
    (prince - commercial)

    http://blog.adsdevshop.com/2007/11/20/easy-pdf-generation-with-ruby-rails-and-htmldoc/
    (htmldoc)

    http://jimneath.org/2009/02/16/creating-pdf-documents-in-ruby-on-rails/
    (prince again, but the comments have some other suggestions)

    Also, I had a vague idea there were Ruby bindings for at least one of
    the HTML rendering libraries out there - a quick search for "ruby gecko"
    turns up a project, but doesn't look like it has changed since 2005.
    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Candler, Jun 2, 2009
    #3
  4. Brian Candler, Jun 30, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Cho
    Replies:
    2
    Views:
    432
    Patrice
    Mar 11, 2005
  2. Peter Mount
    Replies:
    4
    Views:
    1,000
    Peter Mount
    Jan 31, 2006
  3. Ricardo Pog
    Replies:
    1
    Views:
    486
    Austin Ziegler
    Mar 26, 2008
  4. Sean Nakasone
    Replies:
    1
    Views:
    426
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page