PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
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.
// 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 | ![]() | ![]() |
This view displays the document outline, bookmarks, and annotations lists.
await controller.showBotaView();| Android | iOS |
|---|---|
![]() | ![]() |
await controller.showAddWatermarkView();| Android | iOS |
|---|---|
![]() | ![]() |
In the security settings view, you can configure the document password, owner permissions password, and encryption method.
await controller.showSecurityView();| Android | iOS |
|---|---|
![]() | ![]() |
The display settings view allows you to configure the scroll direction, scroll mode, theme color, and other options.
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.
// Enter snipping mode
await controller.enterSnipMode();
// Exit snipping mode
await controller.exitSnipMode();| Android | iOS |
|---|---|
![]() | ![]() |