Questions tagged [pdfkit]

PDFKit is a PDF document generation library built on top of wkhtmltopdf to convert HTML+CSS to pdf using Webkit.

Project homepage

PDFKit is for creating PDFs using plain old HTML+CSS. Uses wkhtmltopdf on the back-end which renders HTML using Webkit.

PDFKit comes with a middleware that allows users to get a PDF view of any page on your site by appending .pdf to the URL.

Uses wkhtmltopdf on the back-end which renders HTML using Webkit.

1084 questions
0
votes
1 answer

wkhtmltopdf (with pdfkit) installed on Ubuntu but not working in Rails

I've done hours of research trying to get PDFKit to work in my production environment. Everything works fine in development, and "kind of" works on my production server. I'm running 64bit Ubuntu server with Nginx/Passenger. I can successfully…
FireDragon
  • 9,325
  • 4
  • 27
  • 34
0
votes
1 answer

Open downloaded file in browser pdf format

I am using paperclip to upload docx doc and pdf files to my railsapp, is there any way I can view this uploaded files in the browser itself in pdf format, without downloading it ?
Hrishikesh Sardar
  • 2,907
  • 4
  • 21
  • 33
0
votes
1 answer

highcharts charts not displaying with pdfkit (wkhtlmltopdf)

I'm just getting blank areas where the charts should be when I use pdfkit to generate pdf's of pages containing highcharts charts. my controller code looks like: html = render_to_string(:template => "pages/pdf", :layout => false, :formats =>…
aperture
  • 2,905
  • 3
  • 35
  • 58
0
votes
0 answers

Get mosaic-like screenshot using IMGKit

Here I want to take a screenshot of an external url, and I use IMGkit with CarrierWave. #Class Micropost after_create :take_snapshot def take_snapshot file = Tempfile.new(["template_#{self.id.to_s}", 'jpg'], 'tmp', :encoding =>…
ZK Zhao
  • 19,885
  • 47
  • 132
  • 206
0
votes
1 answer

How can I create a linearGradient with pdfkit

I was looking for and example on how to use linearGradient with pdfkit - see https://github.com/devongovett/pdfkit/issues/95 "Use doc.linearGradient and doc.radialGradient to create a gradient object, passing in the required parameters. Then call…
0
votes
1 answer

Is there any alternative gem like pdfkit gem?

I would like to print my "test.html.erb" page to pdf format. Please suggest me the other gems like pdf kit which generates the pdf file from html page.
Ashwini
  • 2,449
  • 2
  • 29
  • 42
0
votes
1 answer

convert html to pdf in ruby script only with wkhtmltopdf

I know already pdfkit and wiked_pdf. pdfkit does not generate as I expect pdf from a remote web page. Therefore I'd like to run wkhtmltopdf command in from within a ruby script as I do in the terminal. In the script I've: %x[wkhtmltopdf…
don ali
  • 157
  • 2
  • 16
0
votes
0 answers

Ruby on Rails print and download pdf using pdf middleware

I have installed PDFkit in my rails-project, all works great, but I didn't find any way to print and download generated pdf. I believe that there is anybody who had the same issues as me.
xamenrax
  • 1,724
  • 3
  • 27
  • 47
0
votes
1 answer

pdfkit not rendering the pdf from html properly

I've installed pdfkit and everything seems to be working fine. However, the PDF doesn't look quite like the page i'm trying to have rendered as a PDF. I've tried to make sure that the css files are being loaded properly but I'm not sure how to…
Matthew Berman
  • 8,481
  • 10
  • 49
  • 98
0
votes
1 answer

Rails can't get PDFkit wkhtmltopdf to install on iMac

I'm trying to use PDFkit gem in a Rails app. But, I can't get wkhtmltopdf loaded. I first tried this: $ brew install wkhtmltopdf And got this: ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/qt- …
Reddirt
  • 5,913
  • 9
  • 48
  • 126
0
votes
1 answer

PDFKit with Rails creates malformatted text using render_to_string

I am using PDFKit to render a partial view as a PDF file. However, I'm running into some issues when trying to use render_to_string (preferred method), rather than an external web request. The pdf file when rendered using a url: html =…
Sean S
  • 485
  • 1
  • 5
  • 14
0
votes
2 answers

How to download a html generated by a javascript as pdf

I want to save the html generated by a javascript on a website. When I run the javascript, it returns me the html ready, with a button that link to the chrome printer, to save as pdf. I want to save this html genrated as a PDF, but I can't do it.…
0
votes
2 answers

wkhtmltopdf in Rails with PDFKit

I'm trying to generate a PDF file based on an HTML file in a Rails app. I search and I found this wkhtmltopdf engine, but when I try to generate a pdf appending the '.pdf' sufix in my pages it seems to be in a loop that never ends unless I stop the…
Matheus
  • 13
  • 1
  • 4
0
votes
1 answer

PDFKit, TypeError "Can't convert hash to string"

I'm using PDFKit with it's Middlware to render HTML as PDF but it keeps having a TypeError when I try to go to localhost:3000/booklets/1.pdf can't convert Hash into String It says the error is in BookletsController#show. This is an excerpt from my…
Eric Hu
  • 3
  • 2
0
votes
1 answer

PDFViewAnnotationHitNotification not being delivered

I'm implementing a PDF viewer on the Mac and I want to let the user add annotations. I've added a PDFAnnotationText to the page, and it appears just fine, but when the user clicks on it, the whole document is shrunk and an annotation list appears…
stevex
  • 5,589
  • 37
  • 52