prawn

Current Cursor Position when Using the Prawn Ruby Library

I'm using the Prawn Ruby library (http://prawn.majesticseacreature.com/) to generate some pdf documents. I draw a table without any problem. Next, I want to insert some lines after the table for various people's signatures. Before I draw the lines, I would like to see if there is enough remaining room on the page to fit all the signat...

Ruby 1.9.1 Load Path Craziness

Ok, I've just spent the 4 hours trying to figure this one out without success. I've tried all the usual suspects and googled every combination of ruby 1.9.1, load path, gems, mac os x,freebsd,prawn and other stuff. The bottom line is this: When I compile ruby1.9.1-p129 from sources on mac os x 10.5, the default load path ($:) I get is...

How to retrieve a cell's height using Prawn & Prawnto?

I'm a little stuck on using Prawn/Prawnto to generate PDF documents. The Prawn documentation has helped some, but the Prawnto documentation is seemingly offline these days. I am trying to find a way to space text cells based on the previous cell's height. Prawn has the methods to do this -- no problem, but the return value from doing ...

PDF generation with Prawn and Prawnto

Is anyone using Prawn / Prawnto with Jruby on rails? I installed prawn 0.5.01 and rails 2.3.2. I just installed prawn and prawnto and started playing with the PDF generation capabilities. I am concerned that the pranwto web site is no longer online - http://www.cracklabs.com/prawnto Is this rails plugin dead? Or has it moved somewhe...

Rails PDF Generation with Prawn in IE7

I'm using Prawn and Prawnto to generate a PDF in a Ruby on Rails app (Rails version 2.2.2) which works great and generates PDFs happily and sends them to the user to download in Firefox. The problem is in IE7. I have a route set up like so: map.invoice_pdf '/invoices.pdf', :controller => 'invoices', :action => 'inde...

Table cell border

Hi guys, This is the 2x2 table I need to generate: r1c1 r1c2 r2c1 r2c1 ---- In other words I should print the bottom border of the bottom right cell. This is my code: show.pdf.prawn #This is a two dimensional array: my_array = [["r1c1","r1c2"],["r2c1",Prawn::Table::Cell.new(:text => "r2c2", :border_width => 1 , :borders => ...

How could I justify text in a text_box in Prawn?

Is there a way to justify text in pdf.text_box using the prawn plugin? ...

Using Prawn & Prawnto for Rails PDF generation

This is probably more a design or usage question but the main issue is using the Prawn plugin with Rails 2.3.4 and accessing the resulting PDF object to render it to a file. The scenario is basically; a controller with the respond_to block setup a view with code for rendering the text, graphics etc to PDF It looks like: From C...

How do I define line height with Prawn when generating a pdf in rails app?

I am using prawn to generate a pdf. So far everything has been rather straight forward. I am having a problem defining the leading between lines of text. For example: when using a text_box pdf.text_box "Ipsum dolor sit amet consectetue?", :width => pdf.bounds.width - 10, :height => 150, :overflow => :ellipses This will genera...

Set the font color in prawn

Im using prawn to generate a PDF output in a rails app. How do i change the color of the outputted text? ...

HTML with Prawn

Im trying to use prawn to generate a PDF of a log entry, then entries are stored in bbcode ([b]bold[/b] etc...) and is converted to html on display. Is there any way to display the html in prawn? ...

Passenger with Prawn won't start

I have a app that uses Prawn to do some PDF generating, it works fine and I've had no problems with it. It's now come to the point where I want to test it through Apache using Passenger. This is where the problem appears. I get the passenger error page with this error: no such file to load -- prawn (MissingSourceFile) I restarted scri...

Problems with Prawnto options

Hi there, I'm using Prawnto to generate PDFs in my Rails app. I want three specific options set for my PDFs: I don't want it to start with a blank page I want it to download directly (not inline) I want to specify the filename Here's my controller method: def print @purchase = Purchase.find(params[:id]) prawnto :prawn=>{:sk...

prawnto displaying tables that don't break when new page

Hi all I have a variable number of tables with variable number of rows and I want to have them displaying one after the other but if a table doesn't fit on the current page put it on the next then continue on. I have put the table in a transaction so I can roll back then print it if the height will fit on curent page but how do I get th...

ruby prawn how to wrap text around an aligned right image ?

Hi all s it posible to align an image to the right and wrap text around the image like it is in html and css using the float:right property ? If so how do you do this ? I can align an image but dont't know how to wrap the text around it. The text is dynamic text therefore varies alot in length. Thanks alot Rick ...

Prawn & Prawnto Rails PDF generation - UTF-8 ??

I'm using ruby, prawn, and prawnto to dynamically generate pdf's containing text in other languages. I can't seem to get any text in languages with non-english characters to show up. It doesn't throw any errors...just shows a bunch of dashes instead of characters. Prawn brags on its homepage about UTF-8 support so I don't see why this is...

Ruport vs. Prawn considering long-term use

I want to add reporting capabilities to my Rails application and I'm struggling quite some time now on which reporting software to use to create my PDF documents. Until now I'm pretty sure that either Ruport or Prawn are the best way to go. After experimenting with both of them I find that they both are very powerful and quite universa...

Can prawn generate PDFs with links?

I need to embed a link into a generated pdf in a ruby on rails app. Is there a way to do this with prawn? Reading about this it turns out that prawn-format was the answer for awhile, but 0.7.x broke this. prawn-format uses the link_annotate(rect, options={}) function to create links. What options need to be passed into this to get it t...

Prawn - Indent the first line from the begining of each paragraph

Hi, I would like to indent the first line of each paragraph. According to the following commit, it seems to be done. http://github.com/sandal/prawn/commit/d58f7b4f93d9a5f9720afc00520303666b1c3327 But the main gem release is not yet updated. So even after: sudo gem update it's not okay, and I don't know how to update localy my Prawn...

Rails, Prawn, and Prawnto - possible bug?

Assumptions: A contact has many notes. A contact has the ID of 1. A note belongs to a user. A user has the field name, "name". Using the prawn gem and prawnto plugin, I've noticed the following: In my view (for the PDF): for note in @contact.notes pdf.text "#{note.user.name}" end This is ideally how I'd like to display the PDF,...