public class Annotator extends Object implements com.aspose.ms.System.IDisposable, Closeable
Represents main class that controls document annotating process.
| Constructor and Description |
|---|
Annotator(InputStream inputStream)
Initialise annotator class which accept document stream
|
Annotator(InputStream inputStream,
AnnotatorSettings settings)
Initialise annotator class which accept document stream
|
Annotator(InputStream inputStream,
LoadOptions loadOptions)
Initialise annotator class which accept document stream
|
Annotator(InputStream inputStream,
LoadOptions loadOptions,
AnnotatorSettings settings)
Initialise annotator class which accept inputStream stream
|
Annotator(String filePath)
Initialise annotator class which accept document path
|
Annotator(String filePath,
AnnotatorSettings settings)
Initialise annotator class which accept document path
|
Annotator(String filePath,
LoadOptions loadOptions)
Initialise annotator class which accept document path
|
Annotator(String filePath,
LoadOptions loadOptions,
AnnotatorSettings settings)
Initialise annotator class which accept document path
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AnnotationBase annotation)
Adds annotation to document
|
void |
add(List<AnnotationBase> annotations)
Adds collection of annotations to a document.
|
void |
close() |
void |
dispose()
Dispose
|
void |
exportAnnotationsFromDocument(String filePath)
Export annotations from XML document.
|
List<AnnotationBase> |
get()
Gets collections of document annotations.
|
List<AnnotationBase> |
get(int type)
Gets collection of document annotations by annotation type.
|
Document |
getDocument()
Document
|
int |
getProcessPages()
Document pages
|
Byte |
getRotation()
Document Rotation
|
List<AnnotationBase> |
getVersion(Object version)
Get annotations from versions.
|
List<Object> |
getVersionsList()
Get versions.
|
void |
importAnnotationsFromDocument(String outputPath)
Import annotations from document to XML file.
|
void |
remove(AnnotationBase... annotationsToDelete)
Removes collection of annotations from document by provided annotation
ids.
|
void |
remove(AnnotationBase annotation)
Removes annotation from document.
|
void |
remove(int annotationId)
Removes annotation from document by Id.
|
void |
remove(List<Integer> annotationsIdsToDelete)
Removes collection of annotations from document by provided annotation
ids.
|
void |
removeInternal(List<AnnotationBase> annotationsToDelete)
Removes collection of annotations from document.
|
void |
save()
Saves document after adding, updating or removing annotations.
|
void |
save(OutputStream document)
Saves document after adding, updating or removing annotations.
|
void |
save(OutputStream outputStream,
SaveOptions saveOptions)
Saves outputStream after adding, updating or removing annotations.
|
void |
save(SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
|
void |
save(String filePath)
Saves document after adding, updating or removing annotations.
|
void |
save(String filePath,
SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
|
void |
setProcessPages(int value)
Document pages
|
void |
setRotation(Byte value)
Document Rotation
|
void |
update(AnnotationBase newAnnotation)
Updates document annotation.
|
void |
update(List<AnnotationBase> annotations)
Updates collection of document annotations.
|
public Annotator(InputStream inputStream)
Initialise annotator class which accept document stream
inputStream - Document stream
<b>Learn more</b>
public Annotator(InputStream inputStream, AnnotatorSettings settings)
Initialise annotator class which accept document stream
inputStream - Document streamsettings - Annotator settings
<b>Learn more</b>
public Annotator(InputStream inputStream, LoadOptions loadOptions)
Initialise annotator class which accept document stream
inputStream - Document streamloadOptions - Load options
<b>Learn more</b>
public Annotator(InputStream inputStream, LoadOptions loadOptions, AnnotatorSettings settings)
Initialise annotator class which accept inputStream stream
inputStream - Document streamloadOptions - Load optionssettings - Annotator settings
<b>Learn more</b>
public Annotator(String filePath)
Initialise annotator class which accept document path
filePath - File path
<b>Learn more</b>
public Annotator(String filePath, AnnotatorSettings settings)
Initialise annotator class which accept document path
filePath - File pathsettings - Annotator settings
<b>Learn more</b>
public Annotator(String filePath, LoadOptions loadOptions)
Initialise annotator class which accept document path
filePath - File pathloadOptions - Load options
<b>Learn more</b>
public Annotator(String filePath, LoadOptions loadOptions, AnnotatorSettings settings)
Initialise annotator class which accept document path
filePath - File pathloadOptions - Load optionssettings - Annotator settings
<b>Learn more</b>
public final void add(AnnotationBase annotation)
Adds annotation to document
annotation - The annotation to add.
<b>Learn more</b>
public final void add(List<AnnotationBase> annotations)
Adds collection of annotations to a document.
annotations - The annotations list to add.
<b>Learn more</b>
public void close()
close in interface Closeableclose in interface AutoCloseablepublic final void dispose()
Dispose
dispose in interface com.aspose.ms.System.IDisposablepublic final void exportAnnotationsFromDocument(String filePath)
Export annotations from XML document.
filePath - The input file path.
<b>Learn more</b>
public final List<AnnotationBase> get()
Gets collections of document annotations.
<b>Learn more</b>
public final List<AnnotationBase> get(int type)
Gets collection of document annotations by annotation type.
type - The annotations type that must be returned.
<b>Learn more</b>
public final Document getDocument()
Document
public final int getProcessPages()
Document pages
public final Byte getRotation()
Document Rotation
public final List<AnnotationBase> getVersion(Object version)
Get annotations from versions.
version - The version's Key of versions which you want to returnpublic final List<Object> getVersionsList()
Get versions.
public final void importAnnotationsFromDocument(String outputPath)
Import annotations from document to XML file.
outputPath - The output file path.
<b>Learn more</b>
public final void remove(AnnotationBase... annotationsToDelete)
Removes collection of annotations from document by provided annotation ids.
annotationsToDelete - The annotation's id that must be removed.
<b>Learn more</b>
public final void remove(AnnotationBase annotation)
Removes annotation from document.
annotation - Annotation that must be removed.
<b>Learn more</b>
public final void remove(int annotationId)
Removes annotation from document by Id.
annotationId - The annotation's id that must be removed.
<b>Learn more</b>
public final void remove(List<Integer> annotationsIdsToDelete)
Removes collection of annotations from document by provided annotation ids.
annotationsIdsToDelete - The annotation's id that must be removed.
<b>Learn more</b>
public final void removeInternal(List<AnnotationBase> annotationsToDelete)
Removes collection of annotations from document.
annotationsToDelete - The annotations that must be removed.
<b>Learn more</b>
public final void save()
Saves document after adding, updating or removing annotations.
<b>Learn more about saving annotated documents</b>
public final void save(OutputStream document)
Saves document after adding, updating or removing annotations.
document - The output stream.
<b>Learn more about saving annotated documents</b>
public final void save(OutputStream outputStream, SaveOptions saveOptions)
Saves outputStream after adding, updating or removing annotations.
outputStream - The output stream.saveOptions - The save options.
<b>Learn more about saving annotated documents</b>
public final void save(SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
saveOptions - The save options.
<b>Learn more about saving annotated documents</b>
public final void save(String filePath)
Saves document after adding, updating or removing annotations.
filePath - The output file path.
<b>Learn more about saving annotated documents</b>
public final void save(String filePath, SaveOptions saveOptions)
Saves document after adding, updating or removing annotations.
filePath - The output file path.saveOptions - The save options.
<b>Learn more about saving annotated documents</b>
public final void setProcessPages(int value)
Document pages
value - public final void setRotation(Byte value)
Document Rotation
value - public final void update(AnnotationBase newAnnotation)
Updates document annotation.
newAnnotation - The annotation to update (Id should be provided).
<b>Learn more</b>
public final void update(List<AnnotationBase> annotations)
Updates collection of document annotations.
annotations - The annotations list that will be set.
<b>Learn more</b>
Copyright © 2024. All rights reserved.