I have implemented CSV export, and now I am trying to export data to PDF.
How can one export the CSV data from the CSV generated file to PDF.
Thanks.
You can use prawn https://github.com/sandal/prawn to generate pdfs in ruby with some code like:
require 'prawn'
pdf = Prawn::Document.new
pdf.text(my_csv_data)
pdf.render_file('csv.pdf')
There is also a tutorial here: http://railstips.org/blog/archives/2008/10/13/how-to-generate-pdfs-in-rails-with-prawn/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With