Do not need to close the output stream... closing the writer (PDFwriter.close()) actually closes the outputstream for you (or at least tries, throws an IOException otherwise).