[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.ContentStream

Class ContentStream

Namespace
GrapeCity.Documents.Pdf
Assembly
GcDocs.Pdf.dll

Base abstract class for classes representing content streams in a GcPdfDocument.

public abstract class ContentStream : PdfDictWrapper, IPdfDict
Inheritance
object
ContentStream
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Methods

GetStream()

Gets the System.IO.Stream object containing the content of this ContentStream.

It is the caller's responsibility to dispose the returned stream after usage.

Important: this method returns null if the current ContentStream object is empty.

public virtual Stream GetStream()

Returns

System.IO.Stream

HasContent()

Returns a value indicating whether this content stream is not empty, i.e. it contains some PDF operators.

public virtual bool HasContent()

Returns

bool

SetContent(MemoryStream, bool)

For internal use. Sets the content of this ContentStream from the specified System.IO.MemoryStream. If copyStream is true then stream content will be copied and it should be disposed; otherwise (copyStream is false) the content stream will use passed stream.

public void SetContent(MemoryStream stream, bool copyStream = true)

Parameters

stream System.IO.MemoryStream
copyStream bool