prawn Questions

3

Solved

I can't seem to figure out how to import an image from an url To import the images from my localhost I use: image"./assets/images/img.png" When I replace the path with an URL it says `image' ...
Worser asked 19/7, 2012 at 12:2

8

Solved

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 header...
Affirmation asked 22/4, 2010 at 22:41

3

Solved

I'm creating a pdf book where I need to put a background image for each page. The size of the page is (576 x 576) and the size of the background image is 2700 x 2700 (300 dpi.) (These sizes are th...
Inept asked 10/8, 2011 at 8:7

4

Solved

What I'm trying to do is generate a PDF using Prawn, while having some language specific characters. And as a result I'm getting the following error: raise Prawn::Errors::IncompatibleStringEncodi...
Accumbent asked 17/11, 2016 at 9:40

4

Solved

Im using prawn to generate a PDF output in a rails app. How do i change the color of the outputted text?
Ivy asked 7/1, 2010 at 10:26

2

Solved

I am trying to generate PDFs with Prawn. Inside my PDF template I have tables with cells. In one of those cells I have an email address: cell_email = pdf.make_cell(:content => booking.user_emai...
Mosul asked 9/7, 2012 at 7:13

5

Solved

Is it possible to add a background color to a bounding_box in Prawn? bounding_box([100, cursor], width: 80, height: 20) do pad_top(7) { text "THIS IS TEXT", size: 8, align: :center } stroke_bou...
Taliped asked 20/7, 2013 at 0:11

4

Solved

I need to create a table of contents with Prawn. I have add_dest function calls in my code and the right links in the table of content: add_dest('Komplett', dest_fit(page_count - 1)) and text ...
Paradisiacal asked 16/10, 2012 at 9:36

2

Solved

From my controller I create pdf: def show @order = Order.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @order } format.pdf do pdf = Invoice...
Ergot asked 29/7, 2013 at 2:47

1

Solved

Just last week this was working fine and now my PDF documents are giving me this "Cannot extract the embedded font '1491bd-SourceHanSans-Normal'. Some Characters may not display correctly." error. ...
Piggish asked 15/1, 2020 at 0:5

4

Solved

I need to create an app which makes auto-generated CVs from fields. I need to convert them in PDF/HTML/DOC, but there are many gems available. Which gem do you think is the most appropriate in ord...
Katowice asked 2/6, 2015 at 8:14

3

Solved

I have a ruby script to generate a pdf document with some text. The text contains emojis in it. The problem with the first line of text is that it prints the three emojis separated by something t...
Smacker asked 14/9, 2018 at 21:11

3

I have a small Ruby program where I'm printing some text out to a PDF using Prawn, but a small portion of the text is non-English characters. (Some of that text is Chinese, some is Greek, etc.). Wh...
Banish asked 17/5, 2016 at 22:4

4

Solved

I'm using Prawn to generate a PDF from the controller of a Rails app, ... respond_to do |format| format.pdf do pdf = GenerateReportPdf.new(@object, view_context) send_data pdf.render, filename:...
Historicity asked 18/7, 2015 at 4:11

3

Is it possible to have Prawn fill in check boxes depending on the result of a boolean? For example, I'd like to have a 'Yes' and a 'No' checkbox for a series of questions to record responses. Upon ...
Toomin asked 24/11, 2013 at 23:7

4

Solved

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 bro...
Disobedience asked 7/2, 2010 at 5:59

7

Solved

Im using prawn to create pdfs that contain much data in table format and some lists. The problem with the lists is that Im just using text as lists because there is no semantic equivalent to ul > l...
Assembly asked 9/5, 2012 at 9:43

2

Solved

I want to add a text on an existing PDF using Rails, so I did : filename = "#{Rails.root}/app/assets/images/sample.pdf" Prawn::Document.generate("#{Rails.root}/app/assets/images/full_template.pdf...
Cockcroft asked 22/8, 2012 at 15:17

1

Solved

I want to generate pdf file from DB record. Encode it to Base64 string and store it to DB. Which works fine. Now I want reverse action, How can I decode Base64 string and generate pdf file again? ...
Buerger asked 13/9, 2017 at 11:50

3

Below is my Prawn PDF file to generate a name on the PDF - def initialize(opportunity_application) pdf = Prawn::Document.new(:page_size => [1536, 2048], :page_layout => :landscape) cell_1...
Naima asked 7/9, 2017 at 4:25

4

Solved

Is there a way to keep text as a same block when a new page (don't break it). If it exists, what is the command? I mean for example, I have a paragraph of five lines. When a new page starts I don'...
Cosmos asked 29/7, 2015 at 10:7

2

I'm making a little script with ruby which produces a week schedule PDF file, using Prawn as a PDF library and I'm struggling with styling the table. I'd like to set a static width for all the colu...
Holzman asked 17/10, 2010 at 2:31

1

Is there a way to adjust xy coordinates to fit within a bounding box in Prawn PDF if they are larger then the height of the box? I'm using the gem 'signature-pad-rails' to capture signatures which...
Redoubtable asked 21/4, 2017 at 5:29

3

I'm following this tutorial to create a pdf file using prawn gem, and I found this reference documentation to generate a table. How do I set the header row and the header titles to each column? i...
Carrasquillo asked 15/4, 2011 at 15:36

3

Solved

I'm trying to produce a PDF report with Prawn, I can get it to do a report on a show action easily enough by passing the single ID but I want to produce one with every record in it. Like a standard...
Pharmacopsychosis asked 2/4, 2012 at 18:42

© 2022 - 2024 — McMap. All rights reserved.