Table of Contents

Class PdfTextExtractor

Namespace
Qavren.Edge.Ingestion.Pdf
Assembly
Qavren.Edge.Ingestion.Pdf.dll

Spec 7.4's PDF extractor over PdfPig 0.1.16: page-at-a-time, stream-only, scanned-page aware.

public sealed class PdfTextExtractor : IDocumentExtractor
Inheritance
PdfTextExtractor
Implements
Inherited Members

Remarks

Four rules are load-bearing, and Qavren.Edge.Ingestion.Extractors.Tests asserts each: the document is ALWAYS opened through PdfDocument.Open(Stream, ParsingOptions) — the path overload reads the whole file into a byte array first; GetPages() is enumerated lazily and never materialised, so one page's letters are live at a time; SkipMissingFonts defaults on; and PageBudget is a between-pages watchdog rather than a timeout.

UglyToad.PdfPig.DocumentLayoutAnalysis.Export is never referenced: its exporters use XmlSerializer and are the package's only trim hazard.

Constructors

PdfTextExtractor()
PdfTextExtractor(PdfExtractorOptions)

Properties

Extensions

Lower-case, dotted.

Id

Stable; feeds the recipe hash.

MediaTypes

The media types this extractor claims.

Version

Bump when output changes for identical input.

Methods

CanExtract(DocumentSourceItem)

A last word over the registry's media-type and extension match.

ExtractAsync(DocumentSourceItem, ExtractionContext, CancellationToken)

Extracts one document. The stream is opened here, not by the caller, and the returned document's block offsets index Text.