Statically compile pdftk for Heroku. Need to split PDF into single page files

后端 未结 5 1191
暖寄归人
暖寄归人 2021-02-15 12:18

So we\'re using heroku to host our rails application. We\'ve moved to the cedar stack. This stack does not have the pdftk library installed. I contacted support and was told to

5条回答
  •  清歌不尽
    2021-02-15 13:10

    I read a similar question on SO, and found this approach by Ryan Daigle that worked for me as well: instead of building local binaries that are hard to match to Heroku's servers, use the remote environment to compile and build the required dependencies. This is accomplished using the Vulcan gem, which is provided by Heroku.

    Ryan's article "Building Dependency Binaries for Heroku Applications"

    Another approach by Jon Magic (untested by me), is to download and compile the dependency directly through Heroku's bash, e.g. directly on the server: "Compiling Executables on Heroku".

    On a side note, both approaches are going to result in binaries that are going to break if Heroku's underlying environment changes enough.

提交回复
热议问题