prawnto

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 => ...

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...

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...

Prawnto "Missing Template"

Hi there, I've used Prawnto quite a bit in a few Rails projects. As I'm trying to integrate it into this project, I'm unable to get it working! I've installed the plugin, and the files are there: script/plugin install git://github.com/thorny-sun/prawnto.git I've added this line to environment.rb in the config block: config.gem "praw...

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,...

Rails Prawnto PDFs fail to download in Internet Explorer

Hi there, I have a working Prawnto implementation, except for in IE versions 6 - 8. Here's my print method: prawnto :inline => false, :filename => @purchase.deal.name + "-" + @purchase.customer.name+".pdf", :prawn => {:skip_page_creation=>true} This works fine on Safari, FF and Chrome. You know, the sane browsers. But on IE, the brow...

Wrap text around an image in rails and prawn

I have a document with dynamic image and dynamic text and would like the text around the image. The image is right aligned on the landscape page. Here is what I have so far: pdf.bounding_box([0,pdf.bounds.top - 50], :width => pdf.bounds.width, :height => pdf.bounds.height-50) do pdf.text @article.title, :size => 30, :style => :bold ...

Prawn html formatting

I have some simple lists and bold/italic text to format with prawn. How do I get prawn to pay attention to the html tags instead of just displaying them explicitly. If prawn can't do this, what are my other options? ...

header and footer in Prawn PDF

Hello all, I have read through all relevant posts on Prawn but found no mentioning (even in Prawn's own documentation) of headers and footers. However, I did see a demo on Prawnto's own website about headers and footers. I copied the entire source of that demo just to see if it works but an error of undefined method "header" is complai...

Using Pantone™ colors with Prawn

I'm trying to assign Pantone colors to some text in Prawn. Ideally I'd like to be able to do this pdf.text_color = pdf.pantone(:485U) pdf.text "Whatever" I know this isn't possible. I considered calling pdf.raw and specifying the color manually but the PDF spec (ISO32000:2008) is way too complicated. I need either a simpler way or so...

setup for prawn, prawnto on heroku

I'm trying to use prawn, prawnto for generating pdfs in a rails application hosted on heroku. But I'm struggling on the setup. Is it possible to use prawn, prawnto on heroku? Is there a guide explaining what I should do? ...

How can i change the font size from a specific row in a table using prawn/prawnto?

I am using prawn to generate a pdf form and I need to change the font size for the labels of the fields OR change the headers font size. ...

How to set a Prawn::Table::Cell height?

I am using prawn to generate pdfs and I am having problems when settnig the table height, I set the height but nothing happens. I am using like this: mensagem_tabela = msg_nfe + "\n" + msg_numero + "\n" + msg_serie tabela = Prawn::Table tabela = [[Prawn::Table::Cell.new(:text => mensagem_tabela, :height => 5.cm)]] @data = [[Prawn::Table...