extractTextFromContent function

List<PdfTextItem> extractTextFromContent(
  1. Uint8List content, {
  2. PdfContentResources? resources,
  3. PdfTextExtractionOptions options = const PdfTextExtractionOptions(),
})

Extracts the text of a whole page that is already decoded.

A shortcut for callers that already have the content stream bytes and the resource dictionary at hand.

Implementation

List<PdfTextItem> extractTextFromContent(
  Uint8List content, {
  PdfContentResources? resources,
  PdfTextExtractionOptions options = const PdfTextExtractionOptions(),
}) =>
    PdfTextExtractor(resources: resources, options: options)
        .extract(PdfContentParser.parseBytes(content));