Class PdfSource<TOutput>

Reads one PDF resource as one Microsoft.Extensions.DataIngestion.IngestionDocument. Each PDF page becomes a section and each detected text block becomes a paragraph.

Inherited Members
Namespace: ETLBox.AI
Assembly: ETLBox.AI.Pdf.dll
Syntax
    public class PdfSource<TOutput> : DataFlowStreamSource<TOutput>, IDataFlowStreamSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowStreamSource, IDataFlowExecutableSource, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Examples
var source = new PdfSource("manual.pdf");
var chunk = new ChunkTransformation {
    DocumentPropertyName = "Document"
};
source.LinkTo(chunk);

Constructors

PdfSource()

Declaration
    public PdfSource()

PdfSource(string)

Declaration
    public PdfSource(string uri)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

PdfSource(string, ResourceType)

Declaration
    public PdfSource(string uri, ResourceType resourceType)
Parameters
TypeNameDescription
stringuri

The source of the file. This can be a filename or a web url.Uri

ResourceTyperesourceType

Specifies if data is loaded from a file, a web endpoint or other storage types (e.g. Azure Blob Storage)

Properties

ResultSelector

Creates the outgoing element from the parsed document and the metadata of the current resource. When set, this function is used instead of the ExpandoObject default or the Microsoft.Extensions.DataIngestion.IngestionDocument default.

Declaration
    public Func<IngestionDocument, StreamMetaData, TOutput> ResultSelector { get; set; }
Property Value
TypeDescription
Func<IngestionDocument, StreamMetaData, TOutput>

SkipRows

PDF resources have no text rows to skip. Assigned values are ignored.

Declaration
    public int SkipRows { get; set; }
Property Value
TypeDescription
int

Methods

CloseReader()

Declaration
    protected override void CloseReader()
Overrides

InitReader()

Declaration
    protected override void InitReader()
Overrides

ReadAllRecords()

Declaration
    protected override void ReadAllRecords()
Overrides

Implements