Better handle file name source and output

Fix a bug where printMode was not always accurate or when the print
parameter was given no input (which is fine), but didn't want the
filename for the PDF to be 'true.pdf'.