A Heroku Buildpack to install pdftk-java
as a Native Image in your Slug.
Add this Buildpack as the first Buildpack in your App. Or, at least before other Buildpacks that might need it.
$ heroku buildpacks:add --index=1 stevenharman/pdftk-java-native --app=<YOUR-APP-NAME>
On the next deploy a pdftk-java
Native Image (x86_64
) will be downloaded and added to your Slug.
The binary (pdftk
) will be placed in app/bin
, which is already on the $PATH
.
Meaning the binary will be available as pdftk
.
The pdftk-java
project currently publishes Native Images for versions 3.3.0
- 3.3.3
.
By default this Buildpack downloads and installs the 3.3.3
version.
if you'd like to pin to a specific version, or use newer version when they become available, set the PDFTK_JAVA_NATIVE_VERSION
Config Var.
Like so:
$ heroku config:set PDFTK_JAVA_NATIVE_VERSION=3.3.3
This Buildpack will cache the requested version of the .zip
file and re-use that between build.
If you need to force a re-download of the cached file, you'll need to purge your build cache.
This work is licensed under MIT License.
Copyright (c) 2023 Steven Harman