Search code examples
ruby-on-rails-3pdfreportrender

How to render format in pdf in rails


I want the the table to be displayed in pdf format .

we are using

format.html
format.json{render json: @user}

etc for generating html ,json format

Similarly

  • I want to render the page as pdf .

so what steps are there if it is possible in rails???


Solution

  • Another thing is Prawn.

    It seems more robust and support complex situations. So you may choose this to work with something sophisticated. Get the https://prawnpdf.org/manual.pdf here. The API docs: https://prawnpdf.org/api-docs/2.3.0/

    Thanks Glenn for pointing it out.