prawn Questions

3

Solved

How do I set the font size in a PDF table using the prawn gem? When I call prawn like the following: pdf = Prawn::Document.new(:page_size => 'LEGAL', :page_layout => :landscape) pdf.table d...
Shelli asked 17/7, 2013 at 15:59

2

Solved

This is what I have so far, but I need to set margins: def send_fax contact = Contact.find_by_id(self.contact_id) pdf = Prawn::Document.new pdf.font "Times-Roman" pdf.move_down(20) pdf.text...
Will asked 5/1, 2011 at 1:45

3

I have a formatted_text_box that contains dynamic text. It seems like the box just expands nicely when not given specific dimensions. The problem is it doesn't seem to move the cursor to the botto...
Wappes asked 26/3, 2013 at 19:45

2

Solved

Prawn has a limited number of fonts under Prawn::BASEDIR}/data/fonts/ I have tried gkai00mp.ttf, but generated PDF shows only the 1st letter "千" of 千葉, for example. I feel like this font is good...
Bustup asked 9/12, 2013 at 5:17

1

Solved

I can't for the life of me find any documentation on how to change the background color of a pdf to something besides white?
Mercorr asked 30/4, 2015 at 3:19

1

I have a ReportPdf inherited from Prawn::Document. When I test it from Rails console, The embedded png image in pdf rendered correctly. ReportPdf.new(param1,param2).render_file('/Users/ZZ/Desktop...
Knightly asked 24/8, 2015 at 3:3

2

Solved

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 wan...
Heligoland asked 24/6, 2010 at 2:30

2

Solved

I'm creating generator of pdf documents in Ruby on Rails with Prawn gem and I came up with issue that when I have Chinese, Japanese and Cyrillic chars they are displayed incorrectly. I googled out...
Vinegarish asked 18/6, 2012 at 10:45

1

Im using the Prawn gem to generate a pdf table. I need to set the width of the table to 100%. How can I do this? Here's my slmun_pdf.rb class SlmunPdf < Prawn::Document def initialize(slmunDb...
Chetchetah asked 19/6, 2014 at 8:23

1

Solved

How can I insert an existing PDF into a Prawn generated document? I am generating a pdf for a bill (as a view), and that bill can have many attachments (png, jpg, or pdf). How can I insert/embed/in...
Bibliomania asked 22/3, 2015 at 19:43

1

Solved

class Report attr_reader :pdf def to_pdf Prawn::Document.new(page_layout: page_layout) do |pdf| @pdf = pdf pdf.repeat(:all) do frame_page end pdf.repeat(:all) do write_header end #wri...
Telegram asked 23/2, 2015 at 2:21

5

I'm using Prawn and Prawnto to display a PDF-based reports to the user, but in some circumstances, I'd also like to save the PDF as an attachment to one of my models. I'm using Paperclip for all of...
Sentry asked 17/2, 2011 at 21:25

5

Solved

I would like to add a dynamically generated text. Is there a way to watermark an existing PDF in Ruby?
Ez asked 26/4, 2010 at 19:13

3

Solved

I have created a table in prawn and wanted to pass the :position option by whih is also documented in the manual but it throws off an Method_missing error. It seems like this parameter doesnt exist...
Moores asked 8/3, 2012 at 14:6

2

Solved

I am using Prawn 0.12.0 in a Rails 3.2.12 app. If I have an image on my local server it can show in a standard rails view, and I can also have it shown in a Prawn PDF using the following code @lo...
Scorpaenoid asked 5/9, 2013 at 6:26

2

Solved

I'm using Rails 4 + prawn_rails + the latest version of prawn (v 1.1.0) and I noticed in the changelog here: https://github.com/prawnpdf/prawn/wiki/CHANGELOG that tables are now separated. I follo...
Hustler asked 27/6, 2014 at 15:21

3

Solved

-Hello Sandeep here. I am an apprentice to the Jedi Master Yoda. My master believes the force is strong in the Ruby community and has chosen me for a simple task to complete using the Ruby langauge...
Impolitic asked 2/2, 2011 at 1:25

5

Let's say we want to display a title on the first page that takes up the top half of the page. The bottom half of the page should then fill up with our article text, and the text should continue to...
Mazur asked 24/6, 2013 at 18:9

3

Solved

Looking to a gem that adds gtraphing capabilities to prawn, I found this one but it seems a litle outdated. Is there any more active gem for that?
Celebrant asked 25/10, 2012 at 14:54

1

Solved

I'm following this railscasts #153, and I'm trying to add table data to prawn. I keep getting this error: Prawn::Errors::UnrecognizedTableContent
Joinder asked 22/4, 2014 at 13:35

2

Solved

I have this code in the view prawn_document(:page_size=> "A4", :top_margin => 80, :bottom_margin => 40, :background => "public/uploads/1.png") do |pdf| creation_date = Time.now.strf...
Olio asked 26/2, 2014 at 5:6

1

Is it possible to embed an image along with a text in a table cell using gem prawn? I'm using gem "prawn", "~> 0.13.2" I could embed either an image or a text only. But, not both. please help...
Cung asked 14/1, 2014 at 11:8

2

Solved

We are currently working on a Rails application hosted on Heroku. We are trying to generate a PDF and push it to the user to download. We are using Prawn to handle the PDF generation. Our code fo...
Duke asked 12/3, 2012 at 21:0

1

Solved

I want to specify a font style for a certain cell. What I found in the documentation is the capacity to do it for all the cell, but not for one I need: table data, :cell_style => { :font => ...
Analysand asked 29/9, 2013 at 3:33

1

Solved

I want to draw a simple horizontal rule. What I'm doing is: move_down 30 horizontal_rule and Gemfile gem 'prawn', :git => "https://github.com/prawnpdf/prawn.git", branch: 'master' It does...
Soliloquy asked 29/9, 2013 at 1:34

© 2022 - 2024 — McMap. All rights reserved.