FileSpecification
Vue de l’ensemble
‘FileSpecification’ est une classe dans Aspose.PDF FOSS pour .NET. Inhérents de: ‘IDisposable’.
Il représente une spécification de fichier intégré (PDF §7.11.3).
Cette classe fournit 10 méthodes pour travailler avec les objets de spécification des fichiers dans les programmes .NET. Les méthodologies disponibles comprennent: ‘Dispose’, ‘FileSpecification’, GetData', ‘GatValue’, 'SetV value'. Tous les membres publics sont accessibles à n'importe quelle application .Net après l'installation du package .net Aspose.PDF FOSS. Propriétés: AFRelationship, CollectionItem,Contents` et plus.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
Name | string | Read/Write | The file name. |
Description | string? | Read/Write | The file description. |
Contents | Stream? | Read/Write | Stream for reading or setting the embedded file data. |
StreamContents | Stream? | Read | Alias for Contents. |
MimeType | string? | Read/Write | The MIME type (from /Subtype of the embedded file stream). |
MIMEType | string? | Read/Write | Alias for MimeType naming. |
Params | FileParams | Read/Write | The /Params dict on the embedded-file stream, wrapped as a FileParams. |
UnicodeName | string? | Read/Write | UTF-16 file name (/UF entry, PDF 2.0 preferred over /F). |
FileSystem | string? | Read/Write | File-system identifier carried in /FS. |
IncludeContents | bool | Read/Write | When true, the file spec carries an embedded-file stream (/EF entry). |
AFRelationship | AFRelationship | Read/Write | Relationship between the embedded file and the document content that references it (/AFRelationship, PDF 2.0 §7.11.3). |
Encoding | FileEncoding | Read/Write | Compression applied to the embedded stream’s data when the spec is added to a document: Zip stores it FlateDecode-compressed, None stores it raw. |
EncryptedPayload | EncryptedPayload | Read | Encrypted-payload metadata (PDF 2.0 unencrypted-wrapper support). |
CollectionItem | CollectionItem | Read | Schema-driven collection metadata (portfolio /Collection items). |
Size | long? | Read | The uncompressed size of the embedded file (legacy alias — see FileParams for the proper accessor). |
méthodes
| Signature | Description |
|---|---|
FileSpecification() | Empty file specification with no backing file or stream. |
FileSpecification(file: string) | Create a new file specification for embedding a file (no description). |
FileSpecification(file: string, description: string) | Create a new file specification for embedding a file. |
FileSpecification(fileName: string, annot: Aspose.Pdf.Annotations.Annotation) | Create a file specification linked to a file-attachment annot. |
FileSpecification(stream: Stream, name: string) | Create a new file specification for embedding a stream (no description). |
FileSpecification(stream: Stream, name: string, description: string) | Create a new file specification for embedding a stream. |
GetData() | Get the embedded file data as a byte array. |
GetValue(key: string) | Read a custom name/value pair previously set via SetValue(string, string). |
SetValue(key: string, value: string) | Store a custom name/value pair on the spec. |
Dispose() | Releases resources held by the file spec. |
Voir aussi
- Aspose.PDF pour .NET — API d’entreprise