I get an error after running
mvn install -P all -e to compile and install iText.
I've also done
mvn clean on before hand. The error says:
testFlatteningGenerateAppearances2(com.itextpdf.text.pdf.FlatteningTest): Path to GhostScript is not specified. Please use -DgsExec
Do I need to install Ghostscript?
Add the parameter
skipTests=true in the command line.
The tests create plenty of PDF files (new documents) that need to be compared with reference PDF files
(existing documents stored with the tests). Ghostscript is used to create images of those PDF files.
These images are compared on a pixel basis to check if the new files have the same appearance of the reference files.
If you want to build iText with the tests, you need Ghostscript. If you want to build iText merely to get a jar, you can skip the tests and you don't need Ghostscript.
Click this link if you want to see how to answer this question in iText 5.