logger.debug("extracting pdf file");
File file = null;
PDDocument document = null;
Writer output = null;
try {
PDFParser parser = new PDFParser(is);
parser.parse();
document = parser.getPDDocument();
if (document.isEncrypted()) {
DocumentEncryption decryptor = new DocumentEncryption(document);
if (logger.isDebugEnabled()) {
logger.debug("pdf document appears to be encrypted (will attempt decryption)");