Summary: Ctors | Methods | Inherited Methods | [Expand All]
public class

# ExternalAnnotManager

extends Object
implements AutoCloseable

java.lang.Object
↳ | com.pdftron.pdf.ExternalAnnotManager

## Class Overview

The class ExternalAnnotManager. A manager class attached to a PDFView that takes care of annotations from xfdf sources ExternalAnnotManager instances are created through the PDFView using PDFView.GetExternalAnnotManager()

## Summary

Public Constructors
| ExternalAnnotManager(long impl_ptr)

Public Methods
long | __GetHandle()
void | close() Frees the native memory of the object.
void | destroy() Frees the native memory of the object.
String | getLastJSON() Retrieve the last JSON command string produced by the last call to either Undo, Redo, or TakeSnapshot.
String | getLastXFDF() Retrieve the last XFDF command string produced by the last call to either Undo, Redo, or TakeSnapshot.
String | getNextRedoInfo() Returns any meta-data associated with the next state in the redo chain.
String | getNextUndoInfo() Returns any meta-data associated with the next state in the undo chain.
Rect | jumpToAnnotWithID(String id_string) Set the viewer page, zoom, and pan such that the annotation with the provided ID is on screen.
void | mergeXFDF(String xfdf_content) Merge an xfdf string into the current document.
String | redo() Perform the conversion.
String | takeSnapshot(String payload) Take an undo snapshot, returning the xfdf command string representing any change in state since the last snapshot.
String | undo() Perform the conversion.

[Expand] Inherited Methods
From class java.lang.Object
boolean | equals(Object arg0)
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()
From interface java.lang.AutoCloseable
abstract void | close()

## Public Constructors

#### public ExternalAnnotManager (long impl_ptr)

## Public Methods

#### public long __GetHandle ()

#### public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

#### public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

##### Throws

PDFNetException |

#### public String getLastJSON ()

Retrieve the last JSON command string produced by the last call to either Undo, Redo, or TakeSnapshot.

##### Returns

- an json object representing annotation changes made to the document.

##### Throws

PDFNetException |

#### public String getLastXFDF ()

Retrieve the last XFDF command string produced by the last call to either Undo, Redo, or TakeSnapshot.

##### Returns

- an xfdf command string.

##### Throws

PDFNetException |

#### public String getNextRedoInfo ()

Returns any meta-data associated with the next state in the redo chain.

##### Returns

- a string consisting of the payload that was provided when TakeSnapshot was called.

##### Throws

PDFNetException |

#### public String getNextUndoInfo ()

Returns any meta-data associated with the next state in the undo chain.

##### Returns

- a string consisting of the payload that was provided when TakeSnapshot was called.

##### Throws

PDFNetException |

#### public Rect jumpToAnnotWithID (String id_string)

Set the viewer page, zoom, and pan such that the annotation with the provided ID is on screen.

##### Parameters

id_string | -- ID string of the annot that we will jump to.

##### Returns

- a rectangle containing the screen coordinates of the annotation, in pixels.

##### Throws

PDFNetException |

#### public void mergeXFDF (String xfdf_content)

Merge an xfdf string into the current document. This Xfdf can be in normal Adobe format, or it contain xfdf commands like add, delete, and modify.

##### Parameters

xfdf_content | -- xfdf string with content to be added to the document.

##### Throws

PDFNetException |

#### public String redo ()

Perform the conversion. Will throw an exception on failure. Does nothing if the conversion is already complete. Use GetConversionStatus() to check if there is remaining content to be converted.

##### Returns

- a string consisting of the payload that was provided when TakeSnapshot was called. If that payload was in JSON format, then it will have added field "xfdf", containing the xfdf commands representing the changes made by this call (if any).

##### Throws

PDFNetException |

#### public String takeSnapshot (String payload)

Take an undo snapshot, returning the xfdf command string representing any change in state since the last snapshot.

##### Parameters

payload | -- a string that will be returned when Undo or Redo are called such that the transition marked by this snapshot is reversed..

##### Returns

- an xfdf string.

##### Throws

PDFNetException |

#### public String undo ()

Perform the conversion. Will throw an exception on failure.

##### Returns

- a string consisting of the payload that was provided when TakeSnapshot was called. If that payload was in JSON format, then it will have added field "xfdf", containing the xfdf commands representing the changes made by this call (if any).

##### Throws

PDFNetException |