PdfStreamWriter
Streams a PDF document to an output Stream, letting you write pages sequentially without holding the full document in memory.
Definition
Namespace:Telerik.Documents.Fixed.FormatProviders.Pdf.Streaming
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public sealed class PdfStreamWriter : IDisposable
Inheritance: objectPdfStreamWriter
Implements:
Constructors
Creates a PDF stream writer and optionally leaves the output stream open when disposed.
public PdfStreamWriter(Stream stream, bool leaveStreamOpen)
The stream.
leaveStreamOpenboolBoolean value indicating whether or not to close the stream after PdfStreamWriter instance is disposed.
Creates a PDF stream writer over the specified stream.
Properties
Settings that control how the PDF is produced during streaming (compression, image quality, metadata).
public PdfStreamWriterSettings Settings { get; }
Methods
Finalizes an instance of the PdfStreamWriter class. This finalizer ensures that unmanaged resources are properly released if Dispose was not called explicitly.
protected ~PdfStreamWriter()
Begins a new page with the specified media box, crop box, and rotation and returns a writer for its content.
public PdfPageStreamWriter BeginPage(Rect mediaBox, Rect cropBox, Rotation rotation)
Defines the boundaries of the physical medium on which the page is intended to be displayed or printed.
cropBoxRectDefines the boundaries of the visible region of the page. When the page is displayed or printed, its contents are to be clipped (cropped) to this rectangle.
rotationRotationThe rotation.
Returns:The page stream.
Begins a new page with the specified size and rotation and returns a writer for its content.
public PdfPageStreamWriter BeginPage(Size pageSize, Rotation rotation)
Size of the page.
rotationRotationThe rotation.
Returns:The page stream.
Begins a new page with the specified size and returns a writer for its content.
public PdfPageStreamWriter BeginPage(Size pageSize)
Size of the page.
Returns:The page stream.
Finalizes the document, writes all pending objects, and disposes resources; closes the stream unless leaveStreamOpen is true.
public void Dispose()
Thrown when one or more PdfFileSource instances that were used with this writer have not been disposed before disposing the writer. Always dispose PdfFileSource instances before disposing PdfStreamWriter to avoid empty pages and unexpected results.
Implements:
Writes a page from a PdfPageSource into the output stream and finalizes it.
public void WritePage(PdfPageSource pageSource)
The page source.
Writes a RadFixedPage into the output stream and finalizes it.