Class
PdfFormatProvider

Exports flow documents to PDF format by converting them to fixed-layout documents; import is not supported.

Definition

Namespace:Telerik.Windows.Documents.Flow.FormatProviders.Pdf

Assembly:Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll

Syntax:

cs-api-definition
public class PdfFormatProvider : BinaryFormatProviderBase<RadFlowDocument>, IFormatProvider<RadFlowDocument>, IBinaryFormatProvider<RadFlowDocument>

Inheritance: objectFormatProviderBase<RadFlowDocument>BinaryFormatProviderBase<RadFlowDocument>PdfFormatProvider

Implements: IBinaryFormatProvider<RadFlowDocument>IFormatProvider<RadFlowDocument>

Inherited Members BinaryFormatProviderBase<RadFlowDocument>.Import(byte[], TimeSpan?)BinaryFormatProviderBase<RadFlowDocument>.Export(RadFlowDocument, TimeSpan?)FormatProviderBase<RadFlowDocument>.Import(Stream, TimeSpan?)FormatProviderBase<RadFlowDocument>.Export(RadFlowDocument, Stream, TimeSpan?)FormatProviderBase<RadFlowDocument>.ImportOverride(Stream, CancellationToken)

Constructors

PdfFormatProvider()

Initializes a new instance of the PdfFormatProvider class.

Declaration

cs-api-definition
public PdfFormatProvider()

Properties

CanExport

Gets a value indicating whether this format provider can export documents, which is always true for PDF.

Declaration

cs-api-definition
public override bool CanExport { get; }

Property Value

bool

The value indicating whether can export.

Overrides FormatProviderBase<RadFlowDocument>.CanExport

CanImport

Gets a value indicating whether this format provider can import documents, which is always false for PDF.

Declaration

cs-api-definition
public override bool CanImport { get; }

Property Value

bool

The value indicating whether can import.

Overrides FormatProviderBase<RadFlowDocument>.CanImport

ExportSettings

Gets or sets the export settings that control numbering field precision and extensibility options during PDF generation.

Declaration

cs-api-definition
public PdfExportSettings ExportSettings { get; set; }

Property Value

PdfExportSettings

The export settings.

SupportedExtensions

Gets the file extensions supported by this provider, which includes .pdf only.

Declaration

cs-api-definition
public override IEnumerable<string> SupportedExtensions { get; }

Property Value

IEnumerable<string>

The supported extensions.

Overrides FormatProviderBase<RadFlowDocument>.SupportedExtensions

Methods

ExportOverride(RadFlowDocument, Stream, CancellationToken)

Exports the specified document.

Declaration

cs-api-definition
protected override void ExportOverride(RadFlowDocument document, Stream output, CancellationToken cancellationToken)

Parameters

document

RadFlowDocument

The document.

output

Stream

The output.

cancellationToken

CancellationToken

The cancellation token used to cancel the operation.

Overrides FormatProviderBase<RadFlowDocument>.ExportOverride(RadFlowDocument, Stream, CancellationToken)

ExportToFixedDocument(RadFlowDocument, TimeSpan?)

Converts the flow document to a fixed-layout document with a specified timeout and returns the resulting RadFixedDocument.

Declaration

cs-api-definition
public RadFixedDocument ExportToFixedDocument(RadFlowDocument document, TimeSpan? timeout)

Parameters

document

RadFlowDocument

The document.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

RadFixedDocument

The fixed document.

Exceptions

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.