Skip to content
DemoAPI ReferenceFAQ

PDF Generation Template Editor

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

View on GitHub
React Native Guides Creation policy

Annotation and Form Creation Policy ​

Starting with 3.2.0, ComPDF React Native SDK provides creationConfig to control what happens after reader tools create an annotation or form field.

Configure Creation Behavior ​

tsx
import { ComPDFKit, CPDFReaderView }
  from '@compdfkit_pdf_sdk/react_native';

export function PdfReader({ path }: { path: string }) {
  const configuration = ComPDFKit.getDefaultConfig({
    creationConfig: {
      continuousCreation: false,
      autoSelectCreatedAnnotation: true,
    },
  });
  return <CPDFReaderView document={path} configuration={configuration}
    style={{ flex: 1 }} />;
}
OptionDefaultDescription
continuousCreationtrueKeep the current creation tool active. When false, exit that tool but remain in annotation or form mode
autoSelectCreatedAnnotationtrueSelect the new object automatically. When false, show no focus frame, editing handles, or property panel, and emit no selection event

The options are independent. Use false, true for single creation followed by immediate editing; use true, false for continuous creation without selecting new objects.

Scope ​

The configuration is applied when the reader is created. Recreate the reader with a new configuration to change the policy. It affects interactive creation with tools, not programmatic methods such as addAnnotations() or addWidgets().

Disabling automatic selection does not suppress creation events. Custom workflows must still handle creation callbacks. See Custom Annotation Creation Workflows.