Table of Contents

Class PdfSink

Namespace
Datafication.Sinks.Connectors.WebConnector
Assembly
Datafication.WebConnector.dll

Provides functionality to transform a DataBlock into a PDF stream that represents the records in a table format.

public class PdfSink : IDataSink<Stream>
Inheritance
object
PdfSink
Implements
IDataSink<Stream>

Fields

LandscapeOrientation

Gets or sets a value indicating whether the PDF should be in landscape orientation. Defaults to true.

public bool LandscapeOrientation

Field Value

bool

Properties

Author

Gets or sets a value that will be used as the author string shown under the Title. When the title is null, no title page or author will be created.

public string? Author { get; set; }

Property Value

string

Description

Gets or sets a value that will be used as the description string shown under the Author. When the title is null, no title page or description will be created.

public string? Description { get; set; }

Property Value

string

RowLimit

Gets or sets the row limit for the table. Defaults to 1000 rows.

public int RowLimit { get; set; }

Property Value

int

Title

Gets or sets a value that will be used as the string shown on the title page. When the title is null, no title page is created.

public string? Title { get; set; }

Property Value

string

Methods

Transform(DataBlock)

Transforms the specified DataBlock into a PDF stream.

public Task<Stream> Transform(DataBlock dataBlock)

Parameters

dataBlock DataBlock

The DataBlock to transform into a PDF.

Returns

Task<Stream>

A task that represents the asynchronous operation. The task result contains a Stream with the PDF data.

Remarks

This method creates a PDF document containing a table representation of the DataBlock. The table will include a title page if Title is set, and will respect the RowLimit setting. The PDF will be in landscape orientation if LandscapeOrientation is true.

Exceptions

Exception

Thrown when there is an error generating the PDF.