Rectangle 27 0

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')

Ruby on Rails Export CSV data to PDF - Stack Overflow

ruby-on-rails