I\'ve been using PDFTK Server on OSX pre 10.11 for over a year without any issues running commands on the command line.
After installing OS
Please note that in order to install it on macOS High Sierra (10.13.5) or on Mac OS Catalina (10.15) (as mentioned by Ivan Kurmanov in the comments), I had to download the package from:
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
Of course, it won't let you install normally as it's not downloaded from "App Store" so use following instructions:
In the Finder, locate the app you want to open.
Don’t use Launchpad to do this. Launchpad doesn’t allow you to access the shortcut menu.
Control-click the app icon, then choose Open from the shortcut menu.
Click Open.
The app is saved as an exception to your security settings, and you can open it in the future by double-clicking it just as you can any registered app.
After that just go through the installation process, which is pretty much NEXT - NEXT and enjoy :)
The following brew command DID NOT work for me:
brew install https://raw.githubusercontent.com/turforlag/homebrew-cervezas/master/pdftk.rb
It gave following error:
Failure while executing;
/usr/bin/xar -xf /xxxx/Library/Caches/Homebrew/downloads/\#\{url_sha256\}--\*exited with 1.
Good luck!