Class PDAnnotationFileAttachment

  • All Implemented Interfaces:
    COSObjectable

    public class PDAnnotationFileAttachment
    extends PDAnnotationMarkup
    This is the class that represents a file attachment.
    • Field Detail

      • ATTACHMENT_NAME_PUSH_PIN

        public static final java.lang.String ATTACHMENT_NAME_PUSH_PIN
        See get/setAttachmentName.
        See Also:
        Constant Field Values
      • ATTACHMENT_NAME_GRAPH

        public static final java.lang.String ATTACHMENT_NAME_GRAPH
        See get/setAttachmentName.
        See Also:
        Constant Field Values
      • ATTACHMENT_NAME_PAPERCLIP

        public static final java.lang.String ATTACHMENT_NAME_PAPERCLIP
        See get/setAttachmentName.
        See Also:
        Constant Field Values
      • ATTACHMENT_NAME_TAG

        public static final java.lang.String ATTACHMENT_NAME_TAG
        See get/setAttachmentName.
        See Also:
        Constant Field Values
      • SUB_TYPE

        public static final java.lang.String SUB_TYPE
        The type of annotation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDAnnotationFileAttachment

        public PDAnnotationFileAttachment()
        Constructor.
      • PDAnnotationFileAttachment

        public PDAnnotationFileAttachment​(COSDictionary field)
        Creates a Link annotation from a COSDictionary, expected to be a correct object definition.
        Parameters:
        field - the PDF object to represent as a field.
    • Method Detail

      • getFile

        public PDFileSpecification getFile()
                                    throws java.io.IOException
        Return the attached file.
        Returns:
        The attached file.
        Throws:
        java.io.IOException - If there is an error creating the file spec.
      • setFile

        public void setFile​(PDFileSpecification file)
        Set the attached file.
        Parameters:
        file - The file that is attached.
      • getAttachmentName

        public java.lang.String getAttachmentName()
        This is the name used to draw the type of attachment. See the ATTACHMENT_NAME_XXX constants.
        Returns:
        The name that describes the visual cue for the attachment.
      • setAttachementName

        @Deprecated
        public void setAttachementName​(java.lang.String name)
        Set the name used to draw the attachment icon. See the ATTACHMENT_NAME_XXX constants.
        Parameters:
        name - The name of the visual icon to draw.
      • setAttachmentName

        public void setAttachmentName​(java.lang.String name)
        Set the name used to draw the attachment icon. See the ATTACHMENT_NAME_XXX constants.
        Parameters:
        name - The name of the visual icon to draw.