AndroidPdfViewer
AndroidPdfViewer copied to clipboard
bottom part of page is always blur when opened in high resolution
resolution : 3840 x 2160

resolution : 3840 x 2160, and this can be happened when zoom levels on max(3.0) , sample file is here sample.pdf
same issue!
--in pdfviewer.util; --in Constants.java file
changing line below public static float PART_SIZE = 250; to: public static float PART_SIZE = 600; worked for me!
I did not dig that much about this static field but since this is a static field, according to your pdf size resolution, you can change value of this static field before rendering PdfView !!!
While setting this field rendering waiting time, below part shouldn't be forgetten; As doc says: /** * The size of the rendered parts (default 256) * Tinier : a little bit slower to have the whole page rendered but more reactive. * Bigger : user will have to wait longer to have the first visual results */
Change will effect to waiting time. So What you can do is adjusting value of PART_SIZE field but for better waiting rendering time you can make a trade-off between MAXIMUM_ZOOM and PART_SIZE fields. For example; You can say this MAXIMUM_ZOOM value suits my app requirements then according to that zoom value, You can set minumum value of PART_SIZE field!
Fields: Constants.java public static float PART_SIZE public static float MAXIMUM_ZOOM = 10;
@argmnt hello.. i have edited PART_SIZE to 600 but still blur on when rendered the page. This my configuration : pdfView.fromUri(uri) .defaultPage(pageNumber) .onPageChange(this) .enableAnnotationRendering(true) .onLoad(this) .scrollHandle(new DefaultScrollHandle(this)) .spacing(10) // in dp .onPageError(this) .pageFitPolicy(FitPolicy.BOTH) .swipeHorizontal(true) .autoSpacing(true) .enableSwipe(true) .pageSnap(true) .fitEachPage(true) .pageFling(true) .load();
Have you tried higher values for PART_SIZE?
Maybe because of bitmap config, it is RGB 565. Can you try pdfView.useBestQuality(true);
Here is update from CHANGELOG.md
2.7.0-beta.1 (2017-07-05)
- Updates PdfiumAndroid to 1.7.0 which reduces memory usage about twice and improves performance by using RGB 565 format (when not using
pdfView.useBestQuality(true))
I have used this line : pdfView.useBestQuality(true); but still blur. Could you try use this sample ?
@argmnt i use 3.2.0-beta.1 version.
@argmnt i'm using 3.2.0-beta.1. I have add pdfview.useBestQuality(true); looks good for page 1 but for the next page still blurry.
@laabroo You need to set autospacing to False.I was having the same issue in my pdf app so i just turned off the autospacing feature and the issue was resolved.
same issue! I try public static float PART_SIZE = 600; not work I try with the .autoSpacing(false) not work.
Does anyone have another possibility?