Questions tagged [prawn]

Prawn is a fast, nimble Ruby library for creating PDF files.

Prawn is a fast, nimble Ruby library for creating PDF files.

More information on the library can be found here. There is a wiki and the source is available on GitHub.

For support requests, you can use the Prawn mailing list or #prawn on Freenode.

699 questions
-1
votes
3 answers

How do I generate pdf file using Prawn in Rails?

I have used the following syntax to generate a pdf file: Prawn::Document.generate("#{RAILS_ROOT}/public/pdf/generate.pdf") do pdf.text "hello" end But when I look for the file within the…
zealmurugan
  • 329
  • 5
  • 18
-1
votes
1 answer

Insert bar graph in Prawn pdf

I am using Prawn to generate pdfs reports. I need to put in my report a simple bar graph. Currently what is the best way to insert a graph in a prawn pdf ?
volt
  • 347
  • 5
  • 19
-1
votes
2 answers

Where is the syntax error in this Ruby snippet?

Pulling my hair out... Prawn::Document.generate(@targetfile) do |pdf| pdf.bounding_box ([80, 510] , :width => 400) do pdf.text("hello") end end gives a syntax error, unexpected ',', expecting ')' for the "comma" just before :width =>…
patschiboy
  • 1,091
  • 8
  • 21
-1
votes
2 answers

Replace transpose method?

I have the following code: table([ ["UnitID", "First Name", "NPS Score", "Comments"], *[invite_unitid_arr, invite_name_arr, nps_score_integers_final, comment_arr] .transpose.reject{ |x| x[3].empty? } ], :position…
Luigi
  • 5,443
  • 15
  • 54
  • 108
-1
votes
1 answer

Prawn in a Ruby on Rails app, failing on production

I am stuck on an issue with running prawn in production. I have followed the Railscast (revised http://railscasts.com/episodes/153-pdfs-with-prawn-revised?view=asciicast) pretty much to the letter. It works great in my development environment (Mac…
humbledaisy
  • 373
  • 1
  • 3
  • 12
-1
votes
2 answers

Create a table in Prawn by its html representation

Earlier Prawn gem allowed to create a table by its html representation (having an html table string as an input argument like ....
). Now I didn't find this facility in the manual. So is it possible now? If not, is there…
Alan Coromano
  • 24,958
  • 53
  • 135
  • 205
-2
votes
2 answers

Prawn Ruby Document generate pdf

def generate_report tablica = [] tablica << 1 Prawn::Document.generate("test.pdf") { tablica.each { |a| text a } } end Why this code doesn't work in Prawn??? Which code is correct??
Michał Makaruk
  • 283
  • 1
  • 2
  • 8
-2
votes
3 answers

Which is the latest stable prawn (pdf generation) version?

Which is the latest stable prawn (pdf generation) version ? does it support prawn-format ?
Krishna Prasad Varma
  • 4,670
  • 5
  • 29
  • 41
-4
votes
1 answer

How to generate PDF based on search using prawn in ruby on rails?

What I Would like to achieve is that Document that is generated in PDF should be based on search engine. I used ransack as the tool in order to do searching criteria. I can generate the document in PDF with code below but it generates the whole…
PONCY
  • 11
  • 1
  • 6
1 2 3
46
47