Table of Contents

Method StreamProvider

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

StreamProvider(IPdfStreamProvider)

Sets the stream provider.

public PdfDocumentBuilder StreamProvider(IPdfStreamProvider provider)

Parameters

provider IPdfStreamProvider

The stream provider.

Returns

PdfDocumentBuilder

The updated builder.

Remarks

By default, the library uses PdfMixedStorageStreamProvider with default memory limit.

The library uses streams while creating PDF documents. For example, streams are used as the intermediate storage for images.

The number of streams used depends on the PDF document being generated.

Streams can be of almost any length from a few bytes to several megabytes.

The library tries to specify the size of the stream beforehand but it's possible for the library to request zero length streams and then increase streams length by writing to the stream.

Streams can be used for a short time or the lifetime of the PDF document.

The library calls Dispose for every stream acquired through the stream provider.

The library disposes any stream provider it creates. Any stream provider passed to this method won't be disposed.

Exceptions

ArgumentNullException

provider is null.