FileAttachmentAnnotation
Vue de l’ensemble
‘FileAttachmentAnnotation’ est un type dans Aspose.PDF FOSS pour Go.
FileAttachmentAnnotation insère un fichier dans le document et affiche une icône sur /Rect de l’annottion.
Ce type fournit 13 méthodes pour travailler avec des objets de fichier dans les programmes Go. Les méthodologies disponibles comprennent: ‘AnnotationType’, ‘FileBytes’, FideDescription', ‘FilMIMETypes’, 'PhoneName', ’FilesSize', ‚HasFale‘, 'Icon, ‘RegenerateAppearance’, ‘SetFili’ , ‘SetfileDescriptions’ et 1 méthode supplémentaire. Tous les membres publics sont accessibles à toute application Go après l’installation du package Aspose.PDF FOSS pour Go .
méthodes
| Signature | Description |
|---|---|
AnnotationType() → AnnotationType | Returns the annotation type. |
Icon() → FileAttachmentIcon | Icon returns the /Name entry mapped to a FileAttachmentIcon. |
SetIcon(i: FileAttachmentIcon) | SetIcon writes the /Name entry. |
HasFile() → bool | HasFile returns true if SetFile or SetFileFromStream has been called successfully and not subsequently cleared. |
RegenerateAppearance() | RegenerateAppearance is a no-op for FileAttachmentAnnotation (no /AP — viewers render the icon themselves). |
SetFile(path: string) → error | SetFile embeds the file at path as the annotation’s attachment. |
SetFileFromStream(r: io.Reader, name: string) → error | SetFileFromStream is the io.Reader variant of SetFile. |
FileName() → string | FileName returns the displayed filename from /Filespec/F. |
FileMIMEType() → string | FileMIMEType returns the /Subtype on /EmbeddedFile (e.g. |
FileSize() → int | FileSize returns the size of the embedded file in bytes. |
FileBytes() → []byte | FileBytes returns a defensive copy of the embedded file’s raw bytes. |
FileDescription() → string | FileDescription returns /Filespec/Desc. |
SetFileDescription(s: string) | SetFileDescription writes /Filespec/Desc. |
Voir aussi
- Aspose.PDF — Résultats de l’API d’entreprise