I'm using PdfRenderer
above api 21 to display pdf in my app and I noticed that the quality of pages is very poor.
I followed also google sample to use PdfRenderer
and this is how I create Bitmap
for page:
//mCurrentPage is a PdfRenderer.Page and mImageView is an ImageView
Bitmap bitmap = Bitmap.createBitmap(mCurrentPage.getWidth(),
mCurrentPage.getHeight(),
Bitmap.Config.ARGB_8888);
mCurrentPage.render(bitmap, null, null, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
mImageView.setImageBitmap(bitmap);
I used ARGB_8888
because as far as I know, it's the best quality to display bitmaps.
Am i doing something wrong?
EDIT
This is the huge difference between PdfRenderer class and a classic Pdf reader:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…