How to add pdftk to Heroku Cedar app?

前端 未结 4 2021
不思量自难忘°
不思量自难忘° 2021-02-01 10:06

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 bes

4条回答
  •  温柔的废话
    2021-02-01 10:15

    Using andedebauchery's excellent answer as a guide, I adapted these steps to get pdftk installed on my Heroku Node.js app from my Windows machine in September, 2015. The main differences between his steps and mine are:

    1. I had to update the URL for the github repository from https://github.com/millie/pdftk-source.git to https://github.com/SirRawlins/pdftk-source

    2. I had to download BSDtar in order to extract the executable from the pdftk.tar.gz (I tried GnuWin32 tar.exe first and it didn't work because it doesn't handle .tar.gz files)

    3. I had to use git update-index --add --chmod=+x pdftk to grant execute permission on the file once it got to the remote Linux environment

    Hopefully this will help other Windows developers in the future!

提交回复
热议问题