// try to read PDF without password
pdffile = new PDFFile(buf);
} catch (PDFParseException ppe) {
try {
// try to read PDF with empty password
pdffile = new PDFFile(buf, new PDFPassword(""));
} catch (PDFParseException ppe2) {
// try to read PDF with owner password
pdffile = new PDFFile(buf, new PDFPassword(options.getPdfOwnerPwdStr()));
}
}
// draw the page to an image
PDFPage page = pdffile.getPage(aPage);