-
Notifications
You must be signed in to change notification settings - Fork 324
Open
Description
I'm using the PDFViewer library and I have the next System.err:
12-28 17:27:03.866 32545-32545/com.... W/System.err: com.sun.pdfview.decrypt.PDFAuthenticationFailureException: Password failed authentication for both owner and user password
12-28 17:27:03.874 32545-32545/com.... W/System.err: at com.sun.pdfview.decrypt.StandardDecrypter.<init>(StandardDecrypter.java:200)
12-28 17:27:03.874 32545-32545/com.... W/System.err: at com.sun.pdfview.decrypt.PDFDecrypterFactory.createStandardDecrypter(PDFDecrypterFactory.java:316)
12-28 17:27:03.874 32545-32545/com.... W/System.err: at com.sun.pdfview.decrypt.PDFDecrypterFactory.createDecryptor(PDFDecrypterFactory.java:99)
12-28 17:27:03.874 32545-32545/com.... W/System.err: at com.sun.pdfview.PDFFile.readTrailer(PDFFile.java:1108)
12-28 17:27:03.874 32545-32545/com.... W/System.err: at com.sun.pdfview.PDFFile.parseFile(PDFFile.java:1420)
12-28 17:27:03.882 32545-32545/com.... W/System.err: at com.sun.pdfview.PDFFile.<init>(PDFFile.java:140)
12-28 17:27:03.882 32545-32545/com.... W/System.err: at com.....visor.xml.objects.Strip.renderToBitmap(Strip.java:332)
The code is:
@Nullable
private static Bitmap renderToBitmap(InputStream inputStream) {
Bitmap bitmap = null;
try {
byte[] decode = org.apache.commons.io.IOUtils.toByteArray(inputStream);
ByteBuffer byteBuffer = ByteBuffer.wrap(decode);
PDFPage mPdfPage = new PDFFile(byteBuffer, null).getPage(0);
float width = mPdfPage.getWidth();
float height = mPdfPage.getHeight();
RectF clip = null;
bitmap = mPdfPage.getImage((int) (width), (int) (height), clip, true, true);
} catch (IOException ex) {
ex.printStackTrace();
}
return bitmap;
}
and has been found here.
The exact line that the Androir Monitor says the problem is, is the next:
PDFPage mPdfPage = new PDFFile(byteBuffer, null).getPage(0);
Any suggestion? Thank you very much.
Metadata
Metadata
Assignees
Labels
No labels