How do I change background color or texture in the mobile PDF Viewer control?


I have another question about PDFTron Lib for Android . i have tried to look at the API without help before.

My main goal is to change the gray color behind the pdf. But when i use PDFViewCtrl.setBackgroundColor(), its only the little space between the pages. Is it possible to change the whole page background color ?


In order to change the background color, you can use the following method: PDFViewCtrl.setClientBackgroundColor().

For example, if you want a black background, you should use setClientBackgroundColor(0, 0, 0, false). You can also set the background with a drawable using setBackgroundDrawable(Drawable).