throws IOException, SQLException, AuthorizeException, COSVisitorException {
PDDocument document = new PDDocument();
PDDocument sourceDocument = new PDDocument();
try {
Item item = (Item) bitstream.getParentObject();
sourceDocument = sourceDocument.load(bitstream.retrieve());
PDPage coverPage = new PDPage(PDPage.PAGE_SIZE_LETTER);
generateCoverPage(document, coverPage, item);
addCoverPageToDocument(document, sourceDocument, coverPage);
document.save(tempDir.getAbsolutePath() + "/bitstream.cover.pdf");