com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class Annotation

    • Field Detail

      • _disableUpdateAppearance

        public boolean _disableUpdateAppearance
        For Internal usage only
    • Method Detail

      • initialize

        public void initialize(IDocument doc)
        Instance initialization
        Parameters:
        doc - IDocument object
      • getEngineObj

        public com.aspose.pdf.engine.data.IPdfObject getEngineObj()
        For Internal usage only
        Returns:
        Internal onject
      • getEngineDict

        public com.aspose.pdf.engine.data.IPdfDictionary getEngineDict()

        Internal only

        Returns:
        IPdfDictionary object
      • isUpdateAppearanceOnConvert

        public static boolean isUpdateAppearanceOnConvert()

        If true, annotation appearance will be updated before converting PF document into image. This allows convert fields correctly but probably demand more time.

        Returns:
        boolean value
      • setUpdateAppearanceOnConvert

        public static void setUpdateAppearanceOnConvert(boolean value)

        If true, annotation appearance will be updated before converting PF document into image. This allows convert fields correctly but probably demand more time.

        Parameters:
        value - boolean value
      • isUseFontSubset

        public static boolean isUseFontSubset()

        If this property set to true, fonts will be added to document as subsets. Default value is true.

        Returns:
        boolean value
      • setUseFontSubset

        public static void setUseFontSubset(boolean value)

        If this property set to true, fonts will be added to document as subsets. Default value is true.

        Parameters:
        value - boolean value
      • getNormalAppearance

        public XForm getNormalAppearance()

        Gets normal appearance.

        Returns:
        XForm object
      • getFlags

        public int getFlags()

        Get flags of the annotation.

        Returns:
        Flags of the annotation
        See Also:
        AnnotationFlags
      • setFlags

        public void setFlags(int value)

        Set flags of the annotation.

        Parameters:
        value - flags of the annotation
        See Also:
        AnnotationFlags
      • getAnnotationType

        public abstract int getAnnotationType()

        Gets type of annotation.

        Returns:
        int value
        See Also:
        AnnotationType
      • getWidth

        public double getWidth()

        Gets width of the annotation.

        Returns:
        double value, width of the annotation.
      • setWidth

        public void setWidth(double value)

        Sets width of the annotation.

        Parameters:
        value - width of the annotation.
      • getHeight

        public double getHeight()

        Gets height of the annotation.

        Returns:
        height of the annotation
      • setHeight

        public void setHeight(double value)

        Sets height of the annotation.

        Parameters:
        value - height of the annotation
      • getRect

        public Rectangle getRect()

        Gets annotation rectangle.

        Returns:
        Rectangle object
      • setRect

        public void setRect(Rectangle value)

        Sets annotation rectangle.

        Parameters:
        value - Rectangle value
      • getRectangle

        public Rectangle getRectangle(boolean considerRotation)

        Returns rectangle of annotation taking into consideration page rotation.

        Parameters:
        considerRotation - If true, page rotation is taken into consideration.
        Returns:
        Rectangle object
      • getContents

        public String getContents()

        Gets annotation text.

        Returns:
        String value
      • setContents

        public void setContents(String value)

        Sets annotation text.

        Parameters:
        value - String value
      • getName

        public String getName()

        Gets annotation name on the page.

        Returns:
        String value
      • setName

        public void setName(String value)

        Sets annotation name on the page.

        Parameters:
        value - String value
      • getModifiedInternal

        public com.aspose.ms.System.DateTime getModifiedInternal()

        Gets date and time when annotation was recently modified.

        Returns:
        DateTime object
      • getModified

        public Date getModified()

        Gets date and time when annotation was recently modified.

        Returns:
        date and time when annotation was recently modified.
      • setModifiedInternal

        public void setModifiedInternal(com.aspose.ms.System.DateTime value)

        Sets date and time when annotation was recently modified.

        Parameters:
        value - DateTime object
      • setModified

        public void setModified(Date value)

        Sets date and time when annotation was recently modified.

        Parameters:
        value - Date object
      • getColor

        public Color getColor()

        Gets annotation color.

        Returns:
        Color object
      • setColor

        public void setColor(Color value)

        Sets annotation color.

        Parameters:
        value - Color value
      • getBorder

        public Border getBorder()

        Gets annotation border characteristics. Border

        Returns:
        Border object
      • setBorder

        public void setBorder(Border value)

        Sets annotation border characteristics. Border

        Parameters:
        value - Border value
      • getActiveState

        public String getActiveState()

        Gets current annotation appearance state.

        Returns:
        String value
      • setActiveState

        public void setActiveState(String value)

        Sets current annotation appearance state.

        Parameters:
        value - String value
      • getCharacteristics

        public Characteristics getCharacteristics()

        Gets annotation characteristics.

        Returns:
        Characteristics object
      • getStates

        public AppearanceDictionary getStates()

        Gets appearance dictionary of annotation.

        Returns:
        AppearanceDictionary object
      • getAlignment

        @Deprecated
        public int getAlignment()
        Deprecated. 

        Annotation alignment. This property is obsolete. Use HorizontalAligment instead.

        Returns:
        TextAlignment element
        See Also:
        TextAlignment
      • setAlignment

        @Deprecated
        public void setAlignment(int value)
        Deprecated. 

        Annotation alignment. This property is obsolete. Use HorizontalAligment instead.

        Parameters:
        value - TextAlignment element
        See Also:
        TextAlignment
      • getHorizontalAlignment_Annotation_New

        public int getHorizontalAlignment_Annotation_New()

        Gets text alignmennt for annotation.

        Returns:
        text alignmennt for annotation.
        See Also:
        HorizontalAlignment
      • setHorizontalAlignment_Annotation_New

        public void setHorizontalAlignment_Annotation_New(int value)

        Sets text alignmennt for annotation.

        Parameters:
        value - text alignmennt for annotation.
        See Also:
        HorizontalAlignment
      • createAnnotation

        public static Annotation createAnnotation(com.aspose.pdf.engine.data.IPdfObject annotEngineObj,
                                  Page page)
        For internal usage only

        Initializes annotation from PDF object which describes the annotation.

        Parameters:
        annotEngineObj - PDF object describing annotation
        page - Page object
        Returns:
        Created annotation object of appropriate type
      • accept

        public abstract void accept(AnnotationSelector visitor)

        Accepts visitor for annotation processing.

        Parameters:
        visitor - AnnotationSelector object.
      • flatten

        public void flatten()

        Places annotation contents directly on the page, annotation object will be removed.

      • getFullName

        public String getFullName()

        Gets full qualified name of the annotation.

        Returns:
        String value
      • getAppearance

        public AppearanceDictionary getAppearance()

        Gets appearance dictionary of the annotation.

        Returns:
        AppearanceDictionary object
      • getPageIndex

        public int getPageIndex()

        Gets index of page which contains annotation.

        Returns:
        int value
      • getPageIndex

        public int getPageIndex(Annotation annotation)

        Gets index of page which contains annotation.

        Parameters:
        annotation - Annotation object
        Returns:
        int value