public class

ExternalAnnotManager

extends Object
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 destroy()
Frees the native memory of the object.
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.
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ExternalAnnotManager (long impl_ptr)

Public Methods

public long __GetHandle ()

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.

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.

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.

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.

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.

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.

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).

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.

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).

Protected Methods

protected void finalize ()

Throws
Throwable