wicked-pdf

wicked_pdf font size too large in production

守給你的承諾、 提交于 2019-12-01 11:17:15
I am experiencing an issue where the font sizing for rendered PDFs is larger in production . Everything looks great on the PDF generated in development. Here is the rendering from development : Here is the rendering from production : This is making it very difficult for me to format my document for the production server in development. Can you please take a look? HTML Version: http://www.hearingtracker.com/tickets/170 PDF Download: http://www.hearingtracker.com/tickets/170.pdf Here is my controller action: def show @ticket = Ticket.find(params[:id]) respond_to do |format| format.html { render

wicked_pdf: Is it possible to have the header only show on the first page & the footer only on the last?

喜夏-厌秋 提交于 2019-12-01 00:29:22
Right now I have :header => {:html => {:template => "layouts/pdf_header.html.erb"}} setting things up. Is there something I can pass in that will only show the header on the first page of the document? Can I do this for the footer as well? It's almost more important here, because I can't really think of any other way to get a footer to dynamically stick to the bottom of the page when it's going to be different lengths and different numbers of pages every time. Some quick javascript can take care of this. Follow the boilerplate laid out under 'Footers And Headers' on wkhtmltopdf These are your

wicked_pdf: footer height/styling

拥有回忆 提交于 2019-11-30 20:03:27
I'm using the awesome wicked_pdf gem to generate a PDF, but I can't figure out how to change certain styles within the footer. I'm having a HAML template for the footer looking roughly like this: !!! %html %head %meta{:charset => "utf-8"} = wicked_pdf_stylesheet_link_tag "pdf" %body .footer %p Line 1 %p Line 2 %p Line 3 And some styles: .footer { padding-top: 1em; border-top: 1px solid #ccc; } The styles are applied just fine, but the due to a small height of the footer, only the first line is visible. I've tried to set the height via CSS, but no dice so far. If I set a footer using e.g the

Rails 3 -Render PDF from view and attach to email

给你一囗甜甜゛ 提交于 2019-11-30 12:49:37
问题 I have been using Wicked_pdf to render a view as a PDF and actionmailer to send emails, but I can't get them to work together. I want to attach a PDF version of a certain view to an email using actionmailer and send it out by clicking a link or a button. I have a link_to command that sends out an email. Here is my controller that gets the email generated: def sendemail @user = User.find(params[:id]) Sendpdf.send_report(@user).deliver redirect_to user_path(@user) flash[:notice] = 'Email has

Rails 3 -Render PDF from view and attach to email

我只是一个虾纸丫 提交于 2019-11-30 03:12:34
I have been using Wicked_pdf to render a view as a PDF and actionmailer to send emails, but I can't get them to work together. I want to attach a PDF version of a certain view to an email using actionmailer and send it out by clicking a link or a button. I have a link_to command that sends out an email. Here is my controller that gets the email generated: def sendemail @user = User.find(params[:id]) Sendpdf.send_report(@user).deliver redirect_to user_path(@user) flash[:notice] = 'Email has been sent!' end Here is what I have in my actionmailer: class Sendpdf < ActionMailer::Base default :from

Rails 3 ActionMailer and Wicked_PDF

匆匆过客 提交于 2019-11-28 06:23:44
I'm trying to generate emails with rendered PDF attachements using ActionMailer and wicked_pdf. On my site, I'm using already both wicked_pdf and actionmailer separately. I can use wicked_pdf to serve up a pdf in the web app, and can use ActionMailer to send mail, but I'm having trouble attaching rendered pdf content to an ActionMailer (edited for content): class UserMailer < ActionMailer::Base default :from => "webadmin@mydomain.com" def generate_pdf(invoice) render :pdf => "test.pdf", :template => 'invoices/show.pdf.erb', :layout => 'pdf.html' end def email_invoice(invoice) @invoice =

wicked_pdf: Is it possible to have the header only show on the first page & the footer only on the last?

只愿长相守 提交于 2019-11-28 02:17:59
问题 Right now I have :header => {:html => {:template => "layouts/pdf_header.html.erb"}} setting things up. Is there something I can pass in that will only show the header on the first page of the document? Can I do this for the footer as well? It's almost more important here, because I can't really think of any other way to get a footer to dynamically stick to the bottom of the page when it's going to be different lengths and different numbers of pages every time. 回答1: Some quick javascript can

problem implementing wicked pdf on heroku

泄露秘密 提交于 2019-11-27 17:54:05
I am using this guide for integrating wicked_pdf on heroku. But somehow it doesn't seem to work. I got the logs from heroku and its says this: Processing PdfController#get_pdf to pdf (for 115.248.175.50 at 2011-02-15 23:54:44) [GET] Parameters: {"format"=>"pdf", "action"=>"get_pdf", "id"=>"1", "controller"=>"pdf"} ***************WICKED*************** Rendering pdf/get_pdf RuntimeError (PDF could not be generated! /usr/ruby1.8.7/lib/ruby/1.8/open3.rb:73:in `exec': No such file or directory - /app/fa369291-829b-4b61-9efe-b2f0d0a0a42c/home/bin/wkhtmltopdf-amd64 - - (Errno::ENOENT) from /usr/ruby1

Rails 3 ActionMailer and Wicked_PDF

那年仲夏 提交于 2019-11-27 01:24:21
问题 I'm trying to generate emails with rendered PDF attachements using ActionMailer and wicked_pdf. On my site, I'm using already both wicked_pdf and actionmailer separately. I can use wicked_pdf to serve up a pdf in the web app, and can use ActionMailer to send mail, but I'm having trouble attaching rendered pdf content to an ActionMailer (edited for content): class UserMailer < ActionMailer::Base default :from => "webadmin@mydomain.com" def generate_pdf(invoice) render :pdf => "test.pdf",

problem implementing wicked pdf on heroku

十年热恋 提交于 2019-11-26 22:37:35
问题 I am using this guide for integrating wicked_pdf on heroku. But somehow it doesn't seem to work. I got the logs from heroku and its says this: Processing PdfController#get_pdf to pdf (for 115.248.175.50 at 2011-02-15 23:54:44) [GET] Parameters: {"format"=>"pdf", "action"=>"get_pdf", "id"=>"1", "controller"=>"pdf"} ***************WICKED*************** Rendering pdf/get_pdf RuntimeError (PDF could not be generated! /usr/ruby1.8.7/lib/ruby/1.8/open3.rb:73:in `exec': No such file or directory -