For the complete documentation index, see llms.txt. This page is also available as Markdown.

Page color mode

PDFViewCtrl has three special color modes: night mode, inverted color mode, and custom color mode. In night mode, colors are adjusted to improve reading at night, in inverted color mode, all colors are inverted, and in custom color mode, you can set a custom color for text and the background color.

Color modes from left to right: normal color mode, inverted color mode, night mode and custom color mode.

Set the color mode

To set the color mode:

  1. Find the constant value of the color mode

  1. Call SetColorPostProcessMode.

  2. Optionally, set the PDFViewCtrl background color for the best visual result. You can set background color by calling SetClientBackgroundColor (Xamarin.Android) or SetBackgroundColor (Xamarin.iOS).For example, set the background color to black for night mode:

  1. If you are using postprocess_gradient_map, call PDFViewCtrl.SetColorPostProcessColors to set the white and black points. For example, for a sepia effect, try:

  1. Update PDFViewCtrl to redraw the contents:Sample result when using postprocess_gradient_map and a light/dark brown for the white/black color:

Last updated

Was this helpful?