[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.FileSpecification

FileSpecification Class

Represents a PDF File Specification.

The complex architecture of this class is based on the PDF Specification, for full details please consult that spec.

In many practical scenarios while generating PDFs, using the provided static constructors on the derived classes (FileSpecification, EmbeddedFileStream etc.) may be enough though.

Inheritance
PdfDynamicWrapper<IPdfObject>
FileSpecification
Namespace: GrapeCity.Documents.Pdf
Assembly: DS.Documents.Pdf.dll
Syntax
public class FileSpecification : PdfDynamicWrapper<IPdfObject>
Public Class FileSpecification
    Inherits PdfDynamicWrapper(Of IPdfObject)

Constructors

Name Description
FileSpecification()

Initializes a new instance of the FileSpecification class.

Properties

Name Description
DOSFile

Gets the FileSpecification.FileInfo object defining information about referenced file for DOS platform. NOTE: Using this property is not recommended beginning with PDF 1.7.

Desc

Gets or sets the description of this File Specification.

File

Gets the FileSpecification.FileInfo object that specifies information about a referenced file. Note that this property should be used for files with names containing ASCII characters only, and is provided for backwards compatibility. For file names that contain non-ASCII characters, UnicodeFile should be used instead.

FileSystem

Gets or sets the file system to be used to interpret this file specification.

HasEmbeddedFileStream

Gets a value indicating that this file specification has at least one EmbeddedFileStream associated with it.

ID

Gets or sets the FileID object specifying the ID of the referenced file.

MacFile

Gets the FileSpecification.FileInfo object defining information about referenced file for Mac OS platform. NOTE: Using this property is not recommended beginning with PDF 1.7.

Relationship

Gets or sets a value that represents the relationship of this object to the source that points to it.

Predefined values are Source, Data, Alternative, Supplement and Unspecified.

UnicodeFile

Gets the FileSpecification.FileInfo object that specifies information about a referenced file.

UnixFile

Gets the FileSpecification.FileInfo object defining information about referenced file for Unix platform. NOTE: Using this property is not recommended beginning with PDF 1.7.

Volatile

Gets or sets a value indicating whether the file referenced by the file specification is volatile (changes frequently with time). If the value is true, applications should never cache a copy of the file.

Methods

Name Description
FromDOSFileName(string)

Creates a FileSpecification object from a DOS file name.

FromEmbeddedFile(EmbeddedFileStream, string)

Creates a FileSpecification object referencing a specified EmbeddedFileStream.

FromEmbeddedStream(string, EmbeddedFileStream, string)

Creates a FileSpecification object referencing a specified EmbeddedFileStream.

FromURI(string)

Creates a FileSpecification object representing an URI reference.

GetStream()

Gets a Stream containing the content of this FileSpecification, or null if the file specification is empty.

Important: this Stream must be disposed after use.