PDFKit, Rails 3.2, Asset Pipelines

6 views
Skip to first unread message

Jamie Orchard-Hays

unread,
May 28, 2015, 4:19:19 PM5/28/15
to RubyJam, refac...@googlegroups.com
Hey all:

I've been using PDFKit as middleware for a while to generate PDFs in a Rails 3.2 app. A while back I updated the app to use asset pipelines and since then, the PDFGen is broken. PDFs are generated, but the stylesheets are not applied. I've scoured the Web for info, but nothing has sufficed. I even went so far as to temporarily revive an old, saved image at Rackspace just to prove to myself it had worked and that I wasn't nuts.

I can give more info if requested.

Anyone have any experience with this and can give advice? (Maybe it was solved in Rails 4.x versions and I need to plan an upgrade.)

Cheers,

Jamie

Paul

unread,
May 28, 2015, 11:42:08 PM5/28/15
to rubyjam
I found PDFKit a little hard to use. I think it is just a wrapper around wkhtmltopdf. I ended up just creating the command line for wkhtmltopdf directly and calling it with back-ticks. At least then you can debug it on the command line until you figure it out.


--
You received this message because you are subscribed to the Google Groups "Ruby Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyjam+u...@googlegroups.com.
To post to this group, send email to rub...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyjam.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages