Questions tagged [wicked-pdf]

Wicked PDF is a PDF generation plugin for Ruby on Rails using wkhtmltopdf to convert HTML to PDF.

Wicked PDF uses the shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, rather than dealing with a PDF generation DSL of some sort, you simply write an HTML view as you would normally, then let Wicked take care of the hard stuff.

(From wicked_pdf's README)

Resources

  1. Generating PDFs with wicked_pdf
579 questions
4
votes
1 answer

Header HTML has 100% height with wkhtmltopdf 0.12

I am using wkhtmltopdf 0.12 with wicked_pdf or pdfkit and the header takes almost 100% of the page height. It creates these problems : Pages are almost empty There are many more pages than it should
dsimard
  • 7,380
  • 4
  • 21
  • 25
4
votes
1 answer

Display Signature Pad in wicked_pdf - Rails

In Rails I have correctly setup a view to display a captured signature using Signature Pad I would now like to generate a pdf displaying the signature. The signature is json saved as a string in my postgresql db and as mentioned it will generate…
Marklar
  • 1,247
  • 4
  • 25
  • 48
4
votes
2 answers

Wicked_PDF render a string from a template in a background process

I've got a controller "tech" that has an action to email and invoice, from there we use Delayed::Job.enqueue to shove the actual email action into a background process which will be handled via a worker dyno on Heroku. This is all working fine. The…
notaceo
  • 1,093
  • 10
  • 28
4
votes
2 answers

Adding metadata to PDF generated using Wicked PDF

I'm using Wicked PDF to generate a PDF from HTML. I've seen this SO question on adding metadata to a PDF, and it suggests using XMP metadata. How can I use Wicked PDF to add XMP metadata to a generated PDF?
Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
4
votes
1 answer

Wkhtmltopdf Table Overflow Horizontally Auto Page Break

I am using Wicked PDF that uses Wkhtmltopdf 0.9.9.1 via wkhtmltopdf-binary gem. I have a table as described below (simplified)
4
votes
3 answers

Wicked_pdf stylesheet not working on Heroku

I have a Rails app where I use wicked_pdf to generate PDF's. This is all fine and working locally, but when pushed to heroku the PDF does render, but without applying the stylesheet. Especially for PDF rendering I have a CSS file:…
John
  • 6,404
  • 14
  • 54
  • 106
4
votes
1 answer

Wicked pdf footer at the bottom of the last page

I render a pdf that doesn't have a fixed height. I would like to append a footer at the bottom of the last page only, I have tried to play with css but it's still showing on the footer of the first page. Any ideas? At this moment I have a css like…
damoiser
  • 6,058
  • 3
  • 40
  • 66
4
votes
3 answers

Wicked_PDF unable to render SVG, canvas or PNG graphics

I am trying to render some charts using D3 and wicked_pdf. The charts show up fine when I enable the show_as_html flag. But when I render the PDFs itself, only the axes show up. The chart area itself is blank. I know the JavaScript executes since…
user1742188
  • 4,563
  • 8
  • 35
  • 60
4
votes
1 answer

Wicked_PDF not rendering HTML and CSS assets hosted via Asset Sync in production

I'm have a problem rendering PDFs using Wicked_PDF. I'm hosting all of my asset-pipeline resources using Amazon S3 and CloudFront, and things are generated fine while in development; however in production the HTML and CSS assets are not being…
4
votes
1 answer

Fonts on Heroku using wicked_pdf/wkhtmltopdf

I'm using wicked_pdf to generate a PDF from HTML and deploying to Heroku. This is all working fine when deployed and I have experimented with different fonts using @font-face but so far the best results are produced when I just use "serif" as the…
djboardman
  • 152
  • 8
4
votes
1 answer

wicked_pdf, wkhtmltopdf not working with SVG on Heroku

I have a Ruby on Rails 3.2 app using the wicked_pdf gem and wkhtmltopdf 0.9.9 library to produce PDFs on my local machine, which is a MAC OSX 10.7.5 Lion. The app successfully renders HTML pages (that include SVG images) as PDF files, which is the…
Randy Burgess
  • 4,835
  • 6
  • 41
  • 59
4
votes
2 answers

wicked_pdf footer not working

I've got little problem with wicked_pdf footer render. Here is my render method: def invoice render pdf: "#{@order.number}.pdf", footer: { html: { template: "admin/orders/invoice_footer.html" } }, margin: { bottom: 25…
Palo Delinčák
  • 687
  • 1
  • 7
  • 13
3
votes
1 answer

Rails 3: PDF generation with wicked_pdf suddenly does not work anymore ? [undefined method `virtual_path']

Our platform has been online for a while and working just fine. Our customers are able to download their invoices in PDF format just fine. We've been working on a upgrades for a few month, and just today we noticed that "suddenly" non of our PDF…
Alex
  • 4,367
  • 5
  • 29
  • 45
3
votes
4 answers

HTML to PDF Rails

I've tried PDFKit and wicked_pdf. PDFKit almost got me where I wanted but it didn't have support for a css rule so that I could get the footer fixed in the bottom: position: fixed; bottom: 0; Any workarounds to fix this? Googling the subject…
MattiasB
  • 135
  • 2
  • 12
3
votes
0 answers

Rails wicked_pdf & chartkick not working - showing loading

I'm trying to make chartkick work with wicked_pdf but all it does is show a loading sign: I'm using wicked_pdf version: 2.1.0, wkhtmltopdf-binary version:0.12.6.5 I've tried replacing it with wkhtmltopdf-binary-edge (0.12.6.0) with no…