android-pdfview
android-pdfview copied to clipboard
Visibility of text
The library is good, however the text visibility is poor even when zooming. Are you has a solution?
Correction: On my phone (4.2 inches) the text is readable, but on my tablet (10.1 inches) the text is degraded. Would you know where it can come?
Can you show me some screenshot so I can see what king of degradation you are talking about please?
10.1 inches, degraded:
4.2 inches, correct:
Thanks for the screenshot. Does that happen if you zoom in as well?
Before and after zooming, the text is degraded. While zooming the text is almost readable (hard to tell). In contrast, with an advanced zoom the text is correct, it is not degraded.
That's weird, I never encountered these kind of problems, and the lib was originally developed for tablets.
Can you send me your pdf file so I can test it? (Does it happen for other pdf files as well?)
With any PDF, the text is degraded with only 10.1 inch tablet (Samsung Galaxy Tab 10.1). The problem is not related to pdf because by opening it in an external application, the text has no degradation.
I developed the lib on galaxy tab 10.1, so it's really weird. I haven't tested since a long time though. I'll try to find some time to see what's wrong, but don't expect a fix anytime soon.
Same for me... 7" Tablet and Text looks kind of broken.
Tried to enable antiAlising in the PDFView.java
paint.setAntiAlias(true);
canvas.drawBitmap(renderedBitmap, srcRect, dstRect, paint);
but did not change anything.
UPDATE: I Fixed it :) this has done the trick:
paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true);
now the Text is rendered smoothly without looking broken.
Nice, thanks for the tip! I'll try to get some time to test it and include it as a default.
Do you have any news on this issue? We have the same issue when zooming. The text becomes unreadable.
Yes ...The text become unreadable when you zoom... any solutions?
SOLUTION: Changing the GRID_SIZE to 10 in CONSTATS.java helped me solve the issue... Thank u Joan :)
Quote: "UPDATE: I Fixed it :) this has done the trick:
paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true);
now the Text is rendered smoothly without looking broken."
How can I get "paint" object here?
I'm having the same issue here, after some observation I realised that the library is always rendering the top right corner (in horizontal swipe). This area is perfectly rendered, but none of the others are. I tried to use the paint properties and have no sucess. Also the GRID_SIZE constant just render a bigger area, but don't solves the problem. I think there is a problem while calculating the zoomed area to be redered, but the minimap still showing the right one (the place i'm looking at). My device is a Galaxy S5 G900M. If I can help anyway please tell me. Thank you
#145 should fix this issue KR
Can someone tell me where to make those modifications?
paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true);
I have the latest pdfview source in my project but I still have the unreadable text problem sometimes.
Thanks @JoanZapata @BigJenson
I have the same problem. I already tried to change the GRID_SIZE and change properties of paint object. Can someone help?
@yannickgagne the paint object is defined in the constructor of PDFView
hi, i have read how to solve this issue. but i can't, how to add : paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true);
at PDFView.java
or change the GRID_SIZE to 10 in Constant.
maybe anyone can help me. thanks before
this my code..
public class ReaderActivity extends AppCompatActivity { PDFView pdfView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reader);
File filesDir = getExternalFilesDir("pdf/tki.pdf");
pdfView = (PDFView)findViewById(R.id.reader);
pdfView.fromFile(filesDir)
.defaultPage(1)
.showMinimap(false)
.enableSwipe(true)
.load();
}
}
@Shinthings read my last post. To change GRID_SIZE go to Constants.java the declaration is there.
@IkkarionCross thanks for your response, ya how can i change the GRID_SIZE ? the file is locked / read only files. thats my problem