Skip to content
pubscout

compdfkit_flutter

3.2.0, released 3 weeks ago by compdf.com

Comprehensively view, annotate, edit, and sign PDFs in mobile Flutter apps.

$ flutter pub add compdfkit_flutter
Source repository

What it does

Allows developers to quickly add PDF viewing, annotation, editing, form filling, redaction, and signature capabilities to Android and iOS Flutter applications. It provides both a default built-in viewer UI and an embeddable CPDFReaderWidget.

AI-written summary of version 3.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need robust PDF viewing, annotation, form-filling, or signing features in a mobile app.
  • You want a production-ready PDF UI without building custom low-level renderers from scratch.

Skip it when

  • Your target platforms include web or desktop (since it only documents Android and iOS support).
  • You are looking for a pure Dart open-source PDF rendering engine with no commercial dependencies.

Strengths

  • Comprehensive PDF functionality including digital signatures, redaction, form filling, and annotations.
  • Provides both a ready-to-use default viewer and an embeddable CPDFReaderWidget.
  • Cross-platform support for iOS and Android with high-performance rendering.

Weaknesses

  • Requires commercial licensing, native configuration steps (such as custom Podfiles or FragmentActivities), and an explicit XML license asset.
  • License details and pricing are unknown or proprietary.

Setup

Kind
Plugin (native code)
Effort
High
Code generation
No
Direct dependencies
1

Requires adding a license key asset, setting Android minSdkVersion to 23+, updating Android launcher activity to FlutterFragmentActivity, and potentially adding native pods for iOS.

import 'dart:io';
import 'package:compdfkit_flutter/compdfkit.dart';
import 'package:compdfkit_flutter/configuration/cpdf_configuration.dart';
import 'package:compdfkit_flutter/util/cpdf_file_util.dart';
import 'package:flutter/material.dart';

Future<void> openSampleDocument(BuildContext context) async {
  final File licenseFile = await CPDFFileUtil.extractAsset(
    context,
    'assets/license_key_flutter.xml',
  );
  await ComPDFKit.initWithPath(licenseFile.path);

  final pdfFile = await CPDFFileUtil.extractAsset('pdfs/PDF_Document.pdf');
  ComPDFKit.openDocument(
    pdfFile.path,
    password: '',
    configuration: CPDFConfiguration(),
  );
}

Alternatives

Packages that do the same job and could replace compdfkit_flutter.

Works with

Packages commonly used together with compdfkit_flutter: ones it builds on, ones built on it, and its own family.