Skip to content
DemoSampleAPI ReferenceFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub
Android Guides Creation config

Creation Configuration ​

CPDFConfiguration.creationConfig controls the active tool and selection state after creating annotations or forms through the reader UI. It does not affect objects created through document APIs.

Options ​

FieldTypeDefaultDescription
continuousCreationbooleantrueKeeps the creation tool active; when false, returns to the mode's default tool after one object is created
autoSelectCreatedAnnotationbooleantrueAutomatically selects the new annotation or form; when false, leaves it unselected

The options are independent. For example, disable continuous creation and retain automatic selection to adjust an object's properties immediately after creating it.

JSON Configuration ​

Add these options to your configuration file and load it as described in Configuration Overview:

json
{
  "creationConfig": {
    "continuousCreation": false,
    "autoSelectCreatedAnnotation": true
  }
}

Omitting creationConfig or either field uses the corresponding default value.

Configure in Code ​

Set the options before creating CPDFDocumentFragment or starting the document Activity:

java
import com.compdfkit.tools.common.pdf.config.CreationConfig;

configuration.creationConfig = new CreationConfig();
configuration.creationConfig.continuousCreation = false;
configuration.creationConfig.autoSelectCreatedAnnotation = true;
kotlin
import com.compdfkit.tools.common.pdf.config.CreationConfig

configuration.creationConfig = CreationConfig().apply {
    continuousCreation = false
    autoSelectCreatedAnnotation = true
}

Change at Runtime ​

To change the policy in the current reader, configure its internal CPDFReaderView on the main thread:

java
CPDFReaderView readerView = pdfView.getCPdfReaderView();
readerView.setContinuousCreation(false);
readerView.setAutoSelectCreatedAnnotation(true);
kotlin
val readerView = pdfView.getCPdfReaderView()
readerView.setContinuousCreation(false)
readerView.setAutoSelectCreatedAnnotation(true)

Here, pdfView is the Tools reader view. These settings affect subsequent interactive creation; they do not reselect existing objects or change saved PDF content.

See Annotation Toolbar and Form Toolbar for tool integration.