FileAttachmentAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation

public final class FileAttachmentAnnotation extends MarkupAnnotation

Class describes file attachment annotation.

Constructors

ConstructorDescription
FileAttachmentAnnotation(Page page, Rectangle rect, FileSpecification fileSpec)Creates new FileAttachment annotation on the specified page.

Methods

MethodDescription
getAnnotationType()Gets type of annotation.
getFile()Get specification of the file associated with this annotation.
setFile(FileSpecification value)Set specification of the file associated with this annotation.
getIcon()Gets icon that shall be used in displaying annotation.
setIcon(int value)Sets icon that shall be used in displaying annotation.
accept(AnnotationSelector visitor)Accepts visitor object to process annotation.

FileAttachmentAnnotation(Page page, Rectangle rect, FileSpecification fileSpec)

public FileAttachmentAnnotation(Page page, Rectangle rect, FileSpecification fileSpec)

Creates new FileAttachment annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageDocument’s page where annotation should be created.
rectRectangleRequired rectangle that sets annotation’s border.
fileSpecFileSpecificationDescribes the file that shoud be bound with the annotation.

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - int value

getFile()

public FileSpecification getFile()

Get specification of the file associated with this annotation.

Returns: FileSpecification - file specification.

setFile(FileSpecification value)

public void setFile(FileSpecification value)

Set specification of the file associated with this annotation.

Parameters:

ParameterTypeDescription
valueFileSpecificationfile specification.

getIcon()

public int getIcon()

Gets icon that shall be used in displaying annotation.

Returns: int - FileIcon value

setIcon(int value)

public void setIcon(int value)

Sets icon that shall be used in displaying annotation.

Parameters:

ParameterTypeDescription
valueintFileIcon value

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.