Added flattening of PDFs functionality

Even though we'll be using the web service for most of our work, this
CLI tool is the fallback mechanism.

Added the flattening of PDFs as that is now required, with the parameter
'flatten:' which determines if the PDF should be flattened. The reason
for having this choice is so that we can have our test suite working
even against the production.