Windows
ComPDFKit PDF SDK
Guides

Themes

 

CPDFView has four special color modes: dark mode, sepia mode, reseda mode, and custom color mode.

In dark mode, colors are adjusted to improve reading at night or in a poorly-lit environment, in sepia mode, background color is set to emulate the look of an old book, in reseda mode, light-green background is displayed to protect your eyes after long-time reading, and in custom color mode, you can set a custom color for the background color.

Note: Changing the appearance mode will change the PDF rendering style, but it does not modify the PDF on disk.

 

To set the color mode:

1. Find the constant value of the color mode

Themes Constant value
Normal color mode Draw_Mode_Normal
Night mode Draw_Mode_Dark
Sepia mode Draw_Mode_Soft
Reseda mode Draw_Mode_Green
Custom color mode Draw_Mode_Custom

 

2. Call CPDFViewer.SetDrawMode(DrawModes drawMode).

3. If you are using Draw_Mode_Custom, call CPDFViewer.SetDrawMode(DrawModes.Draw_Mode_Custom, uint customBgColor) to set the background color.