Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add pdftk to Heroku Cedar app?

I need to merge multiple PDF files into one in my Heroku Cedar Rails app, and have settled upon using pdftk to do this.

I'm lost as to how to do this. I think the best approach would be to create a custom buildpack that includes a compiled binary for pdftk but I can't quite figure out how to get Vulcan to do this.

Is there a way to do this without Vulcan? Is there a pre-existing ruby buildpack that includes pdftk that I can use?

like image 559
millie Avatar asked Nov 24 '12 21:11

millie


1 Answers

I've got this working now, and a publicly available version of a custom Heroku Ruby buildpack with pdftk is here: https://github.com/millie/heroku-buildpack-ruby-pdftk

Be sure to see the instructions in the README.

Precompiled version of pdftk for Heroku's Cedar stack is available here: https://github.com/millie/pdftk-source

Hope this saves someone else some trouble!

like image 194
millie Avatar answered Oct 20 '22 17:10

millie