Skip to content

Tools

This section introduces how to use the API provided by CPDFReaderWidgetController to directly access features such as the page editing view, watermark addition view, security settings view, etc., while displaying PDF documents with CPDFReaderWidget in Flutter, providing a more flexible user experience.

Open Page Editing View

dart
// Control whether to enter page editing mode; when false, the thumbnail list is shown
bool editMode = true;
controller.showThumbnailView(editMode);
editMode:trueeditMode:false
Androidflutter_android_3.4.7-1flutter_android_3.4.7-2
iOSflutter_ios_3.4.7-1flutter_ios_3.4.7-2

Open BOTA View

This view displays the document outline, bookmarks, and annotations lists.

dart
await controller.showBotaView();
AndroidiOS
flutter_android_3.4.7-3flutter_ios_3.4.7-3

Open Add Watermark Dialog

dart
await controller.showAddWatermarkView();
AndroidiOS
flutter_android_3.4.7-4flutter_ios_3.4.7-4

Open Security Settings View

In the security settings view, you can configure the document password, owner permissions password, and encryption method.

dart
await controller.showSecurityView();
AndroidiOS
flutter_android_3.4.7-5flutter_ios_3.4.7-5

Open Display Settings View

The display settings view allows you to configure the scroll direction, scroll mode, theme color, and other options.

dart
await controller.showDisplaySettingView();
AndroidiOS
flutter_android_3.4.7-6flutter_ios_3.4.7-6

Snipping Function

You can enter snipping mode when displaying a PDF document via the API to capture a specific area.

dart
// Enter snipping mode
await controller.enterSnipMode();
// Exit snipping mode
await controller.exitSnipMode();
AndroidiOS
flutter_android_3.4.7-7flutter_ios_3.4.7-7