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
0
votes
1 answer

Append filename to URL via link_to method- Rails

I need to add a filename to the url via the link_to method. My current URL looks like http://0.0.0.0:3000/vouchers/17/voucher_orders I'm using the prawn gem in my application to generate a PDF however to get the PDF with prawn I need to append the…
Robert B
  • 2,863
  • 4
  • 31
  • 40
0
votes
1 answer

rails 3 sending view_context to Prawn

I'm trying Prawn to generate pdf's, following this RailsCasts If I tried the next code, it works fine: pdf = OrderPdf.new(@order) But, if added "view_context" pdf = OrderPdf.new(@order, view_context) I got this error: "SyntaxError in…
Francisco Jacob
  • 128
  • 2
  • 11
0
votes
1 answer

How to Pass Variable to PDF in Rails

This questions is somewhat related to this question Prawn + Prawnto Issue. I've noticed that if something is really hard to do in rails, you're probably doing it wrong. I have prawnto and prawn installed, and if I go to…
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
0
votes
1 answer

Prawn + Prawnto Issue

I know prawn is working because I have a show action that if I add .pdf on to the end of it loads show.pdf.prawn. However, I have a form: <%= form_tag(:controller => "/holders", :action=> "generate", format: "pdf") do %> <%= label_tag(:count,…
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
0
votes
1 answer

Prawn PDF: create a template without the default page

I want to create a document with prawn one or more pages long that uses a different template for each page. Prawn::Document.generate("test.pdf") do doc.faces.each do |face| start_new_page(:template => face.background_path) end end This…
kreek
  • 8,774
  • 8
  • 44
  • 69
0
votes
1 answer

Delayed_job and Prawn scripts

How do I run Prawn scripts with Delayed_job. (Currently using Bj but not supported in Rails3) This code does not work. /lib/report_job.rb class ReportJob < Struct.new(:prawn_script_name , :account_id ) def perform bundle exec rails…
ray
  • 1
  • 1
0
votes
2 answers

table is breaking to late and begins to early on following page

Im using prawn to generate a report basing on a set of data which is displayed in a table. This works perfectly as long as I dont have too much data. When I have more than 20 datasets the table reaches into my page footer and on the following page…
davidb
  • 8,884
  • 4
  • 36
  • 72
-1
votes
1 answer

What uses prawn for rendering pdfs?

Just curious, how prawn renders pdf? Does it uses a library, webkit or latex or what?
welldan97
  • 3,071
  • 2
  • 24
  • 28
-1
votes
1 answer

"rails plugin install git://github.com/thorny-sun/prawnto.git" is not working in rails 3.0.6

I want to install prawnto plug-in in my rails 3.0.6 application but when i fire the command as given here rails plugin install git://github.com/thorny-sun/prawnto.git it gives me result as given below mkdir -p…
Jeet
  • 19
  • 7
-1
votes
1 answer

Prawn set cell color under a condition while making a table

I'm trying to generate a table while changing the background color of a cell under a condition. I've resorted coming to here for help. Here's an example of what I'm trying to do: idx = 0 pdf.table(myTable) do …
-1
votes
1 answer

Fill PDF form with data and images

My goal is to fill the existing PDF interactive form with user data. Requirements for this are: it should be able to insert data into text fields; it should be able to insert an image on the XY position. I found FillablePDF gem for inserting data…
user5639287
-1
votes
1 answer

What is the best way to convert PDF pairs into single pages?

I need to take an existing PDF (created with Prawn), and combine pairs after page 1 (the cover) into single pages. I would also like to add a vertical line in the center of the joined pages. The pages are to be printed in books, and the goal is to…
Brandon
  • 1,735
  • 2
  • 22
  • 37
-1
votes
1 answer

Wrong prawn method or wrong object?

I am trying to get programm started where i cant read in a csv File an it prints the data out on a pdf-File. Now i have a problem. Heres is my Code: ------------------------------------ require_relative 'friends' class List attr_accessor…
Alassar
  • 3
  • 4
-1
votes
1 answer

Rails View Save Button Disabled

I'm running a controller action "save" by pressing the view's save button. The "post" action redirects to a "print_pdf" action which then renders a pdf via prawn. The trouble is the save button remains disabled. You cannot press the button but the…
-1
votes
1 answer

Both PDF and Word downloads are ASCII-8bit instead of UTF-8

I am building a ruby on rails app. Though the data is stored as UTF-8 in the database, while exporting to Word/PDF, they are ASCII-8bit encoded. Where should I make the change?
1 2 3
46
47