Open zainulaabdin opened 6 years ago
The pdf is rendered as an image. You manipulate the image
@1stmetro, Thank you very much for the reply. I read in several comments that pdf is rendered as an image but I have no clue how to get a reference to the image and change the background color. Basically, I have DayNight Theme in my app and white background is fine for Day theme but does not look good in Night Theme. Please help me to do that. Thank you very much in advance.
You can manipulate the view which might be more beneficial to you
Out of interest what color do you have in mind for a night view ?
Thank you very much, 1stmetro. It's a black(NightTheme)/white(DayTheme). I still believe that it would nice if this library can render pdf on a transparent canvas. Thank you.
Okay I modded my grey scale view and already did a black before seeing your reply.
Simply you use colormatrix to reverse the pdf view so white becomes black etc. Just paint an overlay ontop and job done.
Hi, thank you very much for such a great library, it is very useful and working nicely for me. The only issue, I see is big apk file. I have a question. Is it possible to render the pdf with a transparent background or with a predefined color? I know
pdfView.setBackgroundColor(Color.GREEN);
but it just sets the background of the pdfView container but the pdf still shows white background. Thank you very much.