[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.EmbeddedFileStream

Class EmbeddedFileStream

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

Represents embedded file stream in PDF.

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

Properties

CheckSum

Gets or sets a 16-byte string that is the checksum of the bytes of the uncompressed embedded file. The checksum is calculated by applying the standard MD5 message-digest algorithm to the bytes of the embedded file stream. Checksum calculated automatically when EmbeddedFileStream created with FromFile(GcPdfDocument, string) or FromBytes(GcPdfDocument, byte[]) methods.

public byte[] CheckSum { get; set; }

Property Value

byte[]

CreationDate

Gets or sets the date and time when the embedded file was created.

public PdfDateTime? CreationDate { get; set; }

Property Value

PdfDateTime?

MimeType

Gets or sets the file's MIME type.

public string MimeType { get; set; }

Property Value

string

ModificationDate

Gets or sets the date and time when the embedded file was last modified.

public PdfDateTime? ModificationDate { get; set; }

Property Value

PdfDateTime?

Size

Gets or sets the size of the embedded file, in bytes.

public int? Size { get; set; }

Property Value

int?

Methods

FromBytes(GcPdfDocument, byte[])

Creates a new instance of EmbeddedFileStream from the specified array of bytes.

public static EmbeddedFileStream FromBytes(GcPdfDocument doc, byte[] bytes)

Parameters

doc GcPdfDocument

The owner document.

bytes byte[]

The file data.

Returns

EmbeddedFileStream

The newly created object.

FromFile(GcPdfDocument, string)

Creates a new instance of EmbeddedFileStream from the specified file name.

The file data will be read when the GcPdfDocument is saved.

public static EmbeddedFileStream FromFile(GcPdfDocument doc, string fileName)

Parameters

doc GcPdfDocument

The owner document.

fileName string

The file name.

Returns

EmbeddedFileStream

The newly created object.

GetStream()

Gets the System.IO.Stream containing content of this EmbeddedFileStream, stream should be disposed after usage. NOTE! Method can return null if this EmbeddedFileStream is empty.

public Stream GetStream()

Returns

System.IO.Stream