prawn

Multiple tables on one page with prawn

Hey, I'm using prawn for pdf generation and everything works quite well, but now I'm having a bit of a problem. When I put multiple tables on one page, they just get put over each other and not under each other. Is this normal behaviour and what can I do about it? I add the tables on the most normal behaviour btw :) Thanks! ...

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

prawn PDF: I need to generate nested tables

I need a table where rows are actually 2 rows tables, a nested table that is.. How can I do that in prawn? Maybe I need an extension.. but which one? ...

How to generate table of contents with prawn?

Is there an easy way to generate table of contents with links to corresponding pages? ...

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

watermark existing pdf with ruby

Is there a way to watermark an existing pdf in ruby ? I want to add a dynamically generated text, Thanks, ...

Prawn PDF with Rails mailer?

Hi Everyone, I have successfully created an email that sends on creation of a Kase, but now I need to attach a PDF that is created on the fly by Prawn and Prawno. Basically when you visit a kase such as application.com/kase/1 you just append the URL with .pdf i.e. application.com/kase/1. I spent ages getting the PDF to work and look h...

Prawn image position

I'm trying to layout 6 images per page with prawn in Ruby: case (idx % 6) # ugly when 0 : (pdf.start_new_page; pdf.image img, :position => :left, :vposition =>...

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 to use rails routes in external classes?

I'm using prawn to generate pdfs, set up ala http://wiki.github.com/sandal/prawn/using-prawn-in-rails I'd like to access my routes so I can generate links in my pdfs, but now I'm not in a template like I used to do with prawnto, so I don't have access to the named routes. class MyPdf < Prawn::Document def to_pdf text root_path ...

Rails and Prawn PDF - add current item ID to filename?

Hi Everyone, I have two PDFs that are made "on the fly" using Prawn PDF. The PDFs are called jobsheet.pdf and discharge.pdf - their URLs are: railsroot/kases/IDNO/jobsheet.pdf railsroot/kases/IDNO/discharge.pdf I am trying to work out how to automagically append the filename with the ID number: railsroot/kases/IDNO/jobsheet_IDNO.pd...

How to setup prawn on heroku when installed as a git submodule

I have a rails app that I am trying to deploy to heroku. This app generates pdfs using prawn. I installed prawn as a git submodule rather than as a gem as this is what is recommended on the prawn website (here). This has not worked well with heroku so far though. As stated on heroku's application constraints page submodules are not supp...

Generating PDF's with signatures using Ruby or Ruby on Rails

I'm working on a Rails application that uses prawn to generate PDF's. Long story short, we want to be able to digitally sign generated PDF's. Im not sure where to start reading up exactly. Just wanted to ask if anybody else has been able to accomplish this before, and if so, what kind of resources I should be using to do it. Thanks! ...

Prawn gem: How to create the .pdf from an *existing* file (.xls)

Hi there, Can anybody show me (maybe copy/paste a simple code example) how to create the .pdf file from an existing (.xls) file, using the Prawn gem? (Basically, I'd need the command that "opens" the existing file.) (I'm asking because the Prawn documentation (http://prawn.majesticseacreature.com/docs/) seems to be gone since quite a w...

Rails: Email a pdf generated with prawn to an email sent by ActionMailer?

I have an ecommerce app. I'm using Prawn to generate pdf invoices of orders. I'm using a standard Prawn setup. In views/admin/orders, I have a file called show.pdf.prawn. When the seller is viewing an order in his admin section, he clicks a link that opens the pdf version of the orders/show view. This all works perfectly. Now, the ...

Prawn PDF and empty database cells?

Hi Everyone, I am using Prawn PDF to create PDF files on the fly in my Rails application. I recently came across the rails cell.blank? function, which has proved to be really handy, I can hide any <li> rows I want if there is nothing to display - something I have been wondering about for a while! Is it possible to do the same in Praw...

how to include header and footer information on each page of a prawn pdf in rails

how to include header and footer information on each page of a pdf in rails(prawn).How to identify the top of each page in a pdf.I need a header function from which page count,created on ...need to display; and i can call the same function for different reports. i am using prawn (0.8.4). Can anybody give some solution.. ...