FileAttachmentAnnotation

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

SignatureDescription
AnnotationType()AnnotationTypeReturns the annotation type.
Icon()FileAttachmentIconIcon returns the /Name entry mapped to a FileAttachmentIcon.
SetIcon(i: FileAttachmentIcon)SetIcon writes the /Name entry.
HasFile()boolHasFile 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)errorSetFile embeds the file at path as the annotation’s attachment.
SetFileFromStream(r: io.Reader, name: string)errorSetFileFromStream is the io.Reader variant of SetFile.
FileName()stringFileName returns the displayed filename from /Filespec/F.
FileMIMEType()stringFileMIMEType returns the /Subtype on /EmbeddedFile (e.g.
FileSize()intFileSize returns the size of the embedded file in bytes.
FileBytes()[]byteFileBytes returns a defensive copy of the embedded file’s raw bytes.
FileDescription()stringFileDescription returns /Filespec/Desc.
SetFileDescription(s: string)SetFileDescription writes /Filespec/Desc.

Voir aussi

  • Aspose.PDF — Résultats de l’API d’entreprise
 Français