com.groupdocs.annotation

Class Annotator

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public class Annotator
    extends Object
    implements com.aspose.ms.System.IDisposable

    Represents main class that controls document annotating process.

    • Constructor Detail

      • Annotator

        public Annotator(InputStream document)

        Initialise annotator class which accept document stream

        Parameters:
        document - Document stream
      • Annotator

        public Annotator(InputStream document,
                 AnnotatorSettings settings)

        Initialise annotator class which accept document stream

        Parameters:
        document - Document stream
        settings - Annotator settings
      • Annotator

        public Annotator(InputStream document,
                 LoadOptions loadOptions)

        Initialise annotator class which accept document stream

        Parameters:
        document - Document stream
        loadOptions - Load options
      • Annotator

        public Annotator(InputStream document,
                 LoadOptions loadOptions,
                 AnnotatorSettings settings)

        Initialise annotator class which accept document stream

        Parameters:
        document - Document stream
        loadOptions - Load options
        settings - Annotator settings
      • Annotator

        public Annotator(com.aspose.ms.System.IO.Stream document)
      • Annotator

        public Annotator(com.aspose.ms.System.IO.Stream document,
                 AnnotatorSettings settings)
      • Annotator

        public Annotator(com.aspose.ms.System.IO.Stream document,
                 LoadOptions loadOptions)
      • Annotator

        public Annotator(String filePath)

        Initialise annotator class which accept document path

        Parameters:
        filePath - File path
      • Annotator

        public Annotator(String filePath,
                 AnnotatorSettings settings)

        Initialise annotator class which accept document path

        Parameters:
        filePath - File path
        settings - Annotator settings
      • Annotator

        public Annotator(String filePath,
                 LoadOptions loadOptions)

        Initialise annotator class which accept document path

        Parameters:
        filePath - File path
        loadOptions - Load options
      • Annotator

        public Annotator(String filePath,
                 LoadOptions loadOptions,
                 AnnotatorSettings settings)

        Initialise annotator class which accept document path

        Parameters:
        filePath - File path
        loadOptions - Load options
        settings - Annotator settings
    • Method Detail

      • add

        public final void add(AnnotationBase annotation)

        Add annotation.

        Parameters:
        annotation - The annotation to add.
      • add

        public final void add(List<AnnotationBase> annotations)

        Add list of annotations.

        Parameters:
        annotations - The annotations list to add.
      • addInternal

        public void addInternal(com.aspose.ms.System.Collections.Generic.List<AnnotationBase> annotations)
      • dispose

        public final void dispose()

        Dispose

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • get

        public final List<AnnotationBase> get()

        Get annotations.

        Returns:
        The list of annotations.
      • getDocument

        public final Document getDocument()

        Document

        Returns:
      • getInternal

        public com.aspose.ms.System.Collections.Generic.List<AnnotationBase> getInternal()
      • remove

        public final void remove(int annotationId)

        Remove annotation.

        Parameters:
        annotationId - The annotation's id that must be removed.
      • save

        public final void save(InputStream document)

        Save document.

        Parameters:
        document - The output stream.
      • save

        public final void save(InputStream document,
                SaveOptions saveOptions)

        Save document.

        Parameters:
        document - The output stream.
        saveOptions - The save options.
      • save

        public final void save(String filePath)

        Save document.

        Parameters:
        filePath - The output file path.
      • save

        public final void save(String filePath,
                SaveOptions saveOptions)

        Save document.

        Parameters:
        filePath - The output file path.
        saveOptions - The save options.
      • saveInternal

        public void saveInternal(com.aspose.ms.System.IO.Stream document)
      • saveInternal

        public void saveInternal(com.aspose.ms.System.IO.Stream document,
                        SaveOptions saveOptions)
      • update

        public final void update(AnnotationBase newAnnotation)

        Update annotation.

        Parameters:
        newAnnotation - The annotation to update(must have the same id).
      • update

        public final void update(List<AnnotationBase> annotations)

        Update list of annotations.

        Parameters:
        annotations - The annotations list that will be set.
      • updateInternal

        public void updateInternal(com.aspose.ms.System.Collections.Generic.List<AnnotationBase> annotations)