PDFtk

PDFtk (short for PDF Toolkit) is a toolkit for manipulating Portable Document Format (PDF) documents. It runs on Linux, Windows and MacOS. It comes in three versions: PDFtk Server (open-source command-line tool), PDFtk Free (freeware) and PDFtk Pro (proprietary paid). It is able to concatenate, shuffle, split and rotate PDF files. It can also show and update metadata.
Java implementation.
pdftk-java is a port of PDFtk into Java which is developed by Marc Vinyals and GPL licensed. The initial release was on December 30, 2017.