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.
Starting with 3.2.0, ComPDF Flutter SDK supports CPDFCreationConfig to configure what happens after interactive creation.
import 'package:compdfkit_flutter/configuration/cpdf_configuration.dart';Pass the policy through CPDFConfiguration.creationConfig when creating a reader:
final configuration = CPDFConfiguration(
creationConfig: const CPDFCreationConfig(
continuousCreation: false,
autoSelectCreatedAnnotation: true,
),
);Pass configuration to the configuration parameter of CPDFReaderWidget. This example exits the active creation tool after one object is created and selects the new object.
| Parameter | Default | Description |
|---|---|---|
continuousCreation | true | Keep the current tool active to create more objects of the same type |
autoSelectCreatedAnnotation | true | Automatically select a newly created annotation or form field |
For continuous drawing without selecting new objects, set these parameters to true and false, respectively.
This policy applies to the reader's interactive annotation and form tools, including tools selected through the controller. It does not change programmatic creation through CPDFDocument.addAnnotations() or addWidgets().
The policy is configured separately from Custom Annotation Creation Workflows. Custom UI must still complete or cancel creation as required by the callback; continuousCreation does not replace that workflow.
See Create Annotations and Create Form Fields.