Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Guides

Render Annotation Appearance

ComPDF Flutter SDK supports rendering annotation appearances through the API. After you create or modify an annotation, you can call the following method to obtain the appearance image for annotation types such as ink, stamp, and image annotations:

dart
final annotations = await document.pageAtIndex(0).getAnnotations();
final annotation = annotations.first;
final imageBytes = await document.renderAnnotationAppearance(
  annotation,
  options: const CPDFAnnotationRenderOptions(scale: 4.0),
);
// imageBytes is a Uint8List containing the annotation appearance image data,
// which can be converted to a Flutter Image widget for display.