Some test text!

keyboard_arrow_down

Get started

Download PDFTron SDK
play_arrow

Quick start - view a document

Integrate with NuGetIntegrate manuallyAdd license keyPermissions (Android)Run samplesUpdate to latest version
keyboard_arrow_down

Xamarin.Forms

keyboard_arrow_down

Fundamentals

Java binding (Android)Objective-C binding (iOS)Code sharingDocument lockingDocument saving
keyboard_arrow_down

Document Viewer

play_arrow

Xamarin.Android

OverviewShow a document in an ActivityShow a document in a FragmentViewer configurationToolManager configurationDay and Night themes
play_arrow

Xamarin.iOS

Open from online URL
keyboard_arrow_down

Document Viewer components

Overview
play_arrow

PDFViewCtrl

play_arrow

Reflow

Quick menuCustomize quick menu
play_arrow

Annotation toolbar

play_arrow

Annotation style editor

play_arrow

Page slider

play_arrow

List container

Xamarin.AndroidXamarin.iOS
play_arrow

Annotation list

play_arrow

Document outline

play_arrow

User bookmark list

play_arrow

Thumbnail browser

Add pages dialogCrop pages dialogRotate pages dialogView mode dialog
keyboard_arrow_down

Annotation and collaboration

OverviewToolManager setupRead only mode
play_arrow

Disable annotation creation and editing

Xamarin.AndroidXamarin.iOS
play_arrow

Default annotation properties

play_arrow

Change tool mode

play_arrow

Events

play_arrow

Override annotation handling

Show and hide existing annotationsRealtime collaboration
keyboard_arrow_down

Advanced customization

play_arrow

Add a custom view to a page

Xamarin.AndroidXamarin.iOSCreate a custom toolPage color modePage fit modePage layout modeScrolling direction
keyboard_arrow_down

Conversion

play_arrow

Convert documents to PDF

Xamarin.AndroidXamarin.iOS
play_arrow

Convert HTML to PDF

Xamarin.AndroidXamarin.iOS
keyboard_arrow_down

Parsing and extraction

keyboard_arrow_down

Digital signatures

keyboard_arrow_down

Form filling

keyboard_arrow_down

Search

play_arrow

Text search

Xamarin.AndroidXamarin.iOS
keyboard_arrow_down

Redaction

keyboard_arrow_down

Advanced topics

PrintUnderstand coordinatesGenerate page thumbnails
keyboard_arrow_down

Reference

LocalizationIcon cheat sheet
keyboard_arrow_down

PDF Processing API

Page color modekeyboard_arrow_down

Page color mode

In this document
chevron_rightSet the 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.

linkSet the color mode

To set the color mode:

  1. Find the constant value of the color mode

    Color modeConstant value
    Normal color modePDFRasterizer.ColorPostProcessMode.e_postprocess_none
    Night modePDFRasterizer.ColorPostProcessMode.e_postprocess_night_mode
    Inverted color modePDFRasterizer.ColorPostProcessMode.e_postprocess_invert
    Custom color modePDFRasterizer.ColorPostProcessMode.e_postprocess_gradient_map
  2. Call SetColorPostProcessMode.

  3. 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:

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

  5. Update PDFViewCtrl to redraw the contents:

    Sample result when using postprocess_gradient_map and a light/dark brown for the white/black color: