betto_pdfium library

Pure-Dart entry point for betto_pdfium.

Exports document loading, metadata extraction, text extraction, annotation extraction, and page-size queries. Has no dependency on dart:ui or Flutter, so it can be used in CLI tools and pure-Dart programs:

import 'package:betto_pdfium/betto_pdfium.dart';

Classes

PdfAnnotation
Base class for all PDF annotation types.
PdfColor
An ARGB colour value as extracted from a PDF annotation.
PdfDate
A PDF date value, preserving both the raw string and the parsed DateTime.
PdfDocument
A loaded PDF document.
PdfDocumentInfo
Document-level properties that are distinct from content metadata.
PdfFreeTextAnnotation
A free-text (typewriter) annotation (FPDF_ANNOT_FREETEXT).
PdfImage
A single image object on a PDF page.
PdfImageBitmap
A rendered bitmap returned by PdfDocument.renderImage.
PdfImageMetadata
Source-level metadata for a single image object in a PDF page.
PdfInkAnnotation
A free-draw ink annotation (FPDF_ANNOT_INK).
PdfLineAnnotation
A line annotation (FPDF_ANNOT_LINE).
PdfLinkAnnotation
A link annotation (FPDF_ANNOT_LINK).
PdfMarkupAnnotation
A text markup annotation: highlight, underline, squiggly, or strikeout.
PdfMetadata
Metadata extracted from the PDF Info dictionary.
PdfPageAnnotations
The annotations extracted from a single PDF page.
PdfPageImages
The image objects extracted from a single PDF page.
PdfPageSize
The intrinsic size of a PDF page, measured in PDF user units (points).
PdfPageText
The result of plain text extraction for a single PDF page.
PdfPoint
A point in PDF page coordinates.
PdfPolygonAnnotation
A polygon or polyline annotation.
PdfPopupAnnotation
Popup annotation data inlined onto a parent annotation.
PdfQuadPoints
A set of four corner points defining one quadrilateral region.
PdfRect
A bounding rectangle in PDF page coordinates.
PdfSearchMatch
A single text-search match returned by PdfDocument.search.
PdfShapeAnnotation
A shape annotation: rectangle or ellipse.
PdfStampAnnotation
A rubber stamp annotation (FPDF_ANNOT_STAMP).
PdfTextAnnotation
A sticky note annotation (FPDF_ANNOT_TEXT).
PdfTextExtractorConfig
Configuration for text extraction heuristics.
PdfThumbnail
A thumbnail image for a PDF page.
PdfTocEntry
A single entry in the PDF bookmark/outline tree (Table of Contents).
PdfUnknownAnnotation
An annotation whose subtype is not recognised by this library version.

Enums

PdfAnnotationType
The subtype of a PDF annotation, corresponding to the fpdf_annot.h FPDF_ANNOT_* constants.
PdfColorspace
The colorspace of a PDF image object, corresponding to the FPDF_COLORSPACE_* constants in fpdf_edit.h.
PdfError
Errors that can occur during PDF document operations.
PdfSearchFlag
Flags that control the text-search behaviour of PdfDocument.search.
PdfThumbnailSource
Whether a PdfThumbnail came from an embedded stream or was rendered.

Exceptions / Errors

PdfExtractionException
Thrown when a PDF operation fails.
PdfiumException
A general-purpose exception thrown when an unexpected PDFium native failure occurs.