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.
Inheritance
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, ILoggableTaskType Parameters
| Name | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| string | uri | 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
| Type | Name | Description |
|---|---|---|
| string | uri | The source of the file. This can be a filename or a web url.Uri |
| ResourceType | resourceType | 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
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| int |
Methods
CloseReader()
Declaration
protected override void CloseReader()Overrides
InitReader()
Declaration
protected override void InitReader()Overrides
ReadAllRecords()
Declaration
protected override void ReadAllRecords()