PdfDocumentBuilder.StreamProvider Method

Sets the stream provider.

Namespace:  BitMiracle.Docotic.Pdf.Layout
Assembly:  BitMiracle.Docotic.Pdf.Layout (in BitMiracle.Docotic.Pdf.Layout.dll)

Syntax

C#
public PdfDocumentBuilder StreamProvider(
	IPdfStreamProvider provider
)
VB
Public Function StreamProvider ( 
	provider As IPdfStreamProvider
) As PdfDocumentBuilder

Parameters

provider
Type: BitMiracle.Docotic.Pdf.IPdfStreamProvider
The stream provider.

Return Value

Type: PdfDocumentBuilder
The updated builder.

Exceptions

ExceptionCondition
ArgumentNullExceptionprovider is null.

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.

See Also