Pdftk is a toolkit for PDF manipulation. It is able to concatenate, shuffle, split and rotate PDF files.
The java port pdftk-java has a native image available. You can install it by modifying the build hook like so:
hooks:
build: |
wget https://gitlab.com/api/v4/projects/5024297/packages/generic/pdftk-java/v3.3.2/pdftk
chmod +x pdftk
This should give you the binary /app/./pdftk which you can then call in PHP like so system('/app/./pdftk --add --a --bunch --of --params')
.