com.aspose.note

Class AttachedFile

    • Constructor Detail

      • AttachedFile

        public AttachedFile(Document document,
                            String path)

        Initializes a new instance of the AttachedFile class.

        Parameters:
        document - A parent document of the attached file.
        path - A string that contains the path to the file from which to create the AttachedFile.
      • AttachedFile

        public AttachedFile(Document document,
                            String path,
                            InputStream icon,
                            com.aspose.ms.System.Drawing.Imaging.ImageFormat iconFormat)

        Initializes a new instance of the AttachedFile class.

        Parameters:
        document - A parent document of the attached file.
        path - A string that contains the path to the file from which to create the AttachedFile.
        icon - An icon for the attached file.
        iconFormat - A format of the attached file icon.
      • AttachedFile

        public AttachedFile(Document document,
                            String fileName,
                            InputStream attachedFileStream)

        Initializes a new instance of the AttachedFile class.

        Parameters:
        document - A parent document of the attached file.
        fileName - A name of the attached file.
        attachedFileStream - A stream which contains the attached file bytes.
      • AttachedFile

        public AttachedFile(Document document,
                            String fileName,
                            InputStream attachedFileStream,
                            InputStream icon,
                            com.aspose.ms.System.Drawing.Imaging.ImageFormat iconFormat)

        Initializes a new instance of the AttachedFile class.

        Parameters:
        document - A parent document of the attached file.
        fileName - A name of the attached file.
        attachedFileStream - A stream which contains the attached file bytes.
        icon - An icon for the attached file.
        iconFormat - A format of the attached file icon.
    • Method Detail

      • getLastModifiedTime

        public Date getLastModifiedTime()

        Gets the last modified time.

      • setLastModifiedTime

        public void setLastModifiedTime(Date value)

        Sets the last modified time.

        Parameters:
        value - Date's value.
      • getMaxWidth

        public float getMaxWidth()

        Gets the maximum width to display the embedded file icon.

      • setMaxWidth

        public void setMaxWidth(float value)

        Sets the maximum width to display the embedded file icon.

        Parameters:
        value - Maximum width's value.
      • getMaxHeight

        public float getMaxHeight()

        Gets the maximum height to display the embedded file icon.

      • setMaxHeight

        public void setMaxHeight(float value)

        Sets the maximum height to display the embedded file icon.

        Parameters:
        value - Maximum height's value.
      • isSizeSetByUser

        public boolean isSizeSetByUser()

        Gets a value indicating whether the value of the size of the icon was explicitly updated by the user.

      • setSizeSetByUser

        public void setSizeSetByUser(boolean value)

        Sets a value indicating whether the value of the size of the icon was explicitly updated by the user.

        Parameters:
        value - New value.
      • getText

        public String getText()

        Gets the text representation of the embedded file. The string MUST NOT contain any characters of the value 10 (line feed) or 13 (carriage return).

      • setText

        public void setText(String value)

        Sets the text representation of the embedded file. The string MUST NOT contain any characters of the value 10 (line feed) or 13 (carriage return).

        Parameters:
        value - Text's value.
      • getAlternativeTextTitle

        public final String getAlternativeTextTitle()

        Gets or sets a title of alternative text for the icon of the attached file.

      • setAlternativeTextTitle

        public final void setAlternativeTextTitle(String value)

        Gets or sets a title of alternative text for the icon of the attached file.

      • getAlternativeTextDescription

        public final String getAlternativeTextDescription()

        Gets or sets a body an alternative text for the icon of the attached file.

      • setAlternativeTextDescription

        public final void setAlternativeTextDescription(String value)

        Gets or sets a body an alternative text for the icon of the attached file.

      • getAlignment

        public int getAlignment()

        Gets the alignment.

        Returns:
        The HorizontalAlignment.
      • setAlignment

        public void setAlignment(int value)

        Sets the alignment.

        Parameters:
        value - Alignment's value.
      • getFileName

        public String getFileName()

        Gets the name of the embedded file.

      • getFilePath

        public String getFilePath()

        Gets the path to the original file.

      • getWidth

        public float getWidth()

        Gets the original width of the embedded file icon.

      • getHeight

        public float getHeight()

        Gets the original height of the embedded file icon.

      • setHorizontalOffset

        public void setHorizontalOffset(float value)

        Sets the horizontal offset.

        Specified by:
        setHorizontalOffset in interface IPageChildNode
        Parameters:
        value - Offsets's value.
      • setVerticalOffset

        public void setVerticalOffset(float value)

        Sets the vertical offset.

        Specified by:
        setVerticalOffset in interface IPageChildNode
        Parameters:
        value - Offset's value.
      • getIcon

        public byte[] getIcon()

        Gets the binary data for the icon that is associated with the embedded file.

      • getIconExtension

        public String getIconExtension()

        Gets the extension of the icon.

      • getBytes

        public byte[] getBytes()

        Gets the binary data for an embedded file.

      • getExtension

        public String getExtension()

        Gets the extension of an embedded file.

      • isPrintout

        public boolean isPrintout()

        Gets a value indicating whether the view of the file is printout.

      • setPrintout

        public void setPrintout(boolean value)

        Sets a value indicating whether the view of the file is printout.

        Parameters:
        value - New value.
      • getTags

        public List<NoteTagCore> getTags()

        Gets the list of tags of an attached file.

      • accept

        public void accept(DocumentVisitor visitor)

        Accepts the visitor of the node.

        Specified by:
        accept in interface INode
        Specified by:
        accept in class Node
        Parameters:
        visitor - The object of a class derived from the DocumentVisitor.