On this page
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:true | editMode:false | |
---|---|---|
Android | ||
iOS |
Open BOTA View
This view displays the document outline, bookmarks, and annotations lists.
dart
await controller.showBotaView();
Android | iOS |
---|---|
Open Add Watermark Dialog
dart
await controller.showAddWatermarkView();
Android | iOS |
---|---|
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();
Android | iOS |
---|---|
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();
Android | iOS |
---|---|
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();
Android | iOS |
---|---|