FileAttachmentAnnotation
Overview
FileAttachmentAnnotation is a class in Aspose.PDF FOSS for Java.
Inherits from: MarkupAnnotation.
File attachment annotation (ISO 32000-1:2008, Section 12.5.6.15, /Subtype /FileAttachment).
This class provides 68 methods for working with FileAttachmentAnnotation objects in Java programs.
Available methods include: FileAttachmentAnnotation, flatten, fromDictionary, getActions, getBorder, getColor, getContents, getCreationDate, getFlags, getFlagsAsEnum, getHorizontalAlignment, getHyperlink, and 55 additional methods.
All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package.
Properties: actions, border, color, contents, creationDate, firstParagraphInColumn, and 33 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
icon | String | Read | Returns the icon name for this file attachment annotation (/Name entry). |
title | String | Read | Returns the author or title of the annotation (/T entry). |
opacity | double | Read | Returns the opacity of the annotation (/CA entry, 0.0-1.0, default 1.0). |
subject | String | Read | Returns the subject of the annotation (/Subj entry). |
richText | String | Read | Returns the rich text content of the annotation (/RC entry, XHTML format). |
creationDate | String | Read | Returns the creation date of the annotation (/CreationDate entry). |
replyType | String | Read | Returns the reply type of this annotation (/RT entry). |
popup | PopupAnnotation | Read | Returns the associated popup annotation (/Popup entry). |
inReplyTo | Annotation | Read | Returns the annotation this one is in reply to (/IRT entry). |
subtype | String | Read | Returns the annotation subtype (e.g. |
rect | Rectangle | Read | Returns the annotation rectangle defining its location on the page. |
contents | String | Read | Returns the text content of the annotation (/Contents entry). |
name | String | Read | Returns the unique name of the annotation (/NM entry). |
modified | String | Read | Returns the date and time the annotation was last modified (/M entry). |
flags | int | Read | Returns the annotation flags (/F entry) as a bitmask. |
flagsAsEnum | java.util.EnumSet<AnnotationFlags> | Read | Returns the annotation flags as a typed {@link java.util.EnumSet}. |
invisible | boolean | Read | Returns whether the Invisible flag (bit 1) is set. |
hidden | boolean | Read | Returns whether the Hidden flag (bit 2) is set. |
print | boolean | Read | Returns whether the Print flag (bit 3) is set. |
noZoom | boolean | Read | Returns whether the NoZoom flag (bit 4) is set. |
noRotate | boolean | Read | Returns whether the NoRotate flag (bit 5) is set. |
noView | boolean | Read | Returns whether the NoView flag (bit 6) is set. |
readOnly | boolean | Read | Returns whether the ReadOnly flag (bit 7) is set. |
locked | boolean | Read | Returns whether the Locked flag (bit 8) is set. |
color | Color | Read | Returns the annotation color (/C entry). |
border | Border | Read | Returns the border of this annotation. |
normalAppearanceStream | PdfStream | Read | Returns the raw normal appearance stream (/AP /N) for this annotation |
| (ISO 32000-1:2008, §12.5.5). | |||
normalAppearance | XForm | Read | Returns the normal appearance as an {@link XForm}, mirroring the C# |
| {@code Annotation.NormalAppearance} property. | |||
zIndex | int | Read | Returns the Z-index (drawing order) of this annotation. |
actions | AnnotationActionCollection | Read | Returns the annotation action collection (/AA entry). |
page | Page | Read | Returns the page this annotation belongs to. |
pdfDictionary | PdfDictionary | Read | Returns the underlying PDF dictionary for this annotation. |
margin | MarginInfo | Read | Gets the margin information for this paragraph. |
horizontalAlignment | HorizontalAlignment | Read | Gets the horizontal alignment of this paragraph within its container. |
inLineParagraph | boolean | Read | Returns whether this paragraph is an inline element. |
keptWithNext | boolean | Read | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |||
firstParagraphInColumn | boolean | Read | Returns whether this paragraph is the first in its column. |
inNewPage | boolean | Read | Returns whether this paragraph should start on a new page during layout. |
hyperlink | Hyperlink | Read | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. |
Methods
| Signature | Description |
|---|---|
FileAttachmentAnnotation(dict: PdfDictionary, page: Page) | Constructs a file attachment annotation from an existing PDF dictionary. |
FileAttachmentAnnotation(page: Page, rect: Rectangle) | Constructs a new file attachment annotation with the given rectangle on the specified page. |
getIcon() → String | Returns the icon name for this file attachment annotation (/Name entry). |
setIcon(icon: String) | Sets the icon name for this file attachment annotation |
| (ISO 32000-1:2008 §12.5.6.15, Table 184 — {@code /Name} entry). | |
getTitle() → String | Returns the author or title of the annotation (/T entry). |
setTitle(title: String) | Sets the author or title of the annotation (/T entry). |
getOpacity() → double | Returns the opacity of the annotation (/CA entry, 0.0-1.0, default 1.0). |
setOpacity(opacity: double) | Sets the opacity of the annotation (/CA entry, 0.0-1.0). |
getSubject() → String | Returns the subject of the annotation (/Subj entry). |
setSubject(subject: String) | Sets the subject of the annotation (/Subj entry). |
getRichText() → String | Returns the rich text content of the annotation (/RC entry, XHTML format). |
setRichText(richText: String) | Sets the rich text content of the annotation (/RC entry, XHTML format). |
getCreationDate() → String | Returns the creation date of the annotation (/CreationDate entry). |
setCreationDate(date: String) | Sets the creation date of the annotation (/CreationDate entry). |
getReplyType() → String | Returns the reply type of this annotation (/RT entry). |
setReplyType(replyType: String) | Sets the reply type of this annotation (/RT entry). |
getPopup() → PopupAnnotation | Returns the associated popup annotation (/Popup entry). |
setPopup(popup: PopupAnnotation) | Sets the associated popup annotation (/Popup entry). |
getInReplyTo() → Annotation | Returns the annotation this one is in reply to (/IRT entry). |
setInReplyTo(annotation: Annotation) | Sets the annotation this one is in reply to (/IRT entry). |
getSubtype() → String | Returns the annotation subtype (e.g. |
getRect() → Rectangle | Returns the annotation rectangle defining its location on the page. |
setRect(rect: Rectangle) | Sets the annotation rectangle (ISO 32000-1:2008 §12.5.2, Table 164, |
| {@code /Rect} entry). | |
getContents() → String | Returns the text content of the annotation (/Contents entry). |
setContents(contents: String) | Sets the text content of the annotation (/Contents entry). |
getName() → String | Returns the unique name of the annotation (/NM entry). |
setName(name: String) | Sets the unique name of the annotation (/NM entry). |
getModified() → String | Returns the date and time the annotation was last modified (/M entry). |
setModified(date: String) | Sets the date and time the annotation was last modified (/M entry). |
getFlags() → int | Returns the annotation flags (/F entry) as a bitmask. |
setFlags(flags: int) | Sets the annotation flags (/F entry) as a bitmask. |
getFlagsAsEnum() → java.util.EnumSet<AnnotationFlags> | Returns the annotation flags as a typed {@link java.util.EnumSet}. |
isInvisible() → boolean | Returns whether the Invisible flag (bit 1) is set. |
isHidden() → boolean | Returns whether the Hidden flag (bit 2) is set. |
isPrint() → boolean | Returns whether the Print flag (bit 3) is set. |
isNoZoom() → boolean | Returns whether the NoZoom flag (bit 4) is set. |
isNoRotate() → boolean | Returns whether the NoRotate flag (bit 5) is set. |
isNoView() → boolean | Returns whether the NoView flag (bit 6) is set. |
isReadOnly() → boolean | Returns whether the ReadOnly flag (bit 7) is set. |
isLocked() → boolean | Returns whether the Locked flag (bit 8) is set. |
getColor() → Color | Returns the annotation color (/C entry). |
setColor(color: Color) | Sets the annotation color (/C entry) as an RGB color array. |
getBorder() → Border | Returns the border of this annotation. |
setBorder(border: Border) | Sets the border of this annotation. |
getNormalAppearanceStream() → PdfStream | Returns the raw normal appearance stream (/AP /N) for this annotation |
| (ISO 32000-1:2008, §12.5.5). | |
getNormalAppearance() → XForm | Returns the normal appearance as an {@link XForm}, mirroring the C# |
| {@code Annotation.NormalAppearance} property. | |
flatten() | Flattens this annotation into the page content stream. |
getZIndex() → int | Returns the Z-index (drawing order) of this annotation. |
setZIndex(zIndex: int) | Sets the Z-index (drawing order) of this annotation. |
getActions() → AnnotationActionCollection | Returns the annotation action collection (/AA entry). |
getPage() → Page | Returns the page this annotation belongs to. |
setPage(page: Page) | Sets the page this annotation belongs to. |
getPdfDictionary() → PdfDictionary | Returns the underlying PDF dictionary for this annotation. |
fromDictionary(dict: PdfDictionary, page: Page) → Annotation | Factory method: creates a typed annotation from a PDF dictionary based on its /Subtype. |
getMargin() → MarginInfo | Gets the margin information for this paragraph. |
setMargin(margin: MarginInfo) | Sets the margin information for this paragraph. |
getHorizontalAlignment() → HorizontalAlignment | Gets the horizontal alignment of this paragraph within its container. |
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment) | Sets the horizontal alignment of this paragraph within its container. |
isInLineParagraph() → boolean | Returns whether this paragraph is an inline element. |
setInLineParagraph(inLineParagraph: boolean) | Sets whether this paragraph should be treated as an inline element. |
isKeptWithNext() → boolean | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
setKeptWithNext(keptWithNext: boolean) | Sets whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
isFirstParagraphInColumn() → boolean | Returns whether this paragraph is the first in its column. |
setFirstParagraphInColumn(firstParagraphInColumn: boolean) | Sets whether this paragraph is the first in its column. |
isInNewPage() → boolean | Returns whether this paragraph should start on a new page during layout. |
setInNewPage(inNewPage: boolean) | Sets whether this paragraph should start on a new page during layout. |
getHyperlink() → Hyperlink | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. | |
setHyperlink(hyperlink: Hyperlink) | Attaches a hyperlink to this paragraph. |