Skip to content

Save Document

When using the CPDFReaderWidget component, the document is automatically saved during operations such as sharing, flattening, or adding watermarks. Additionally, you can manually save the document at any desired moment using the CPDFReaderWidgetController. For example:

dart
bool save = await controller.save();

When creating a CPDFReaderWidget, you can set a save listener to handle save events. For example:

dart
CPDFReaderWidget(
  document: widget.documentPath,
  configuration: CPDFConfiguration(),
  onCreated: (controller) {

  },
  onSaveCallback: (){
    debugPrint('CPDFDocument: save success');
  },
)