Loading...
Searching...
No Matches
pdftron::PDF::ExternalAnnotManager Class Reference

`#include <ExternalAnnotManager.h>`

## Public Types
enum | Mode { e_user_only , e_admin_undo_others , e_admin_undo_own }

## Public Member Functions
| ExternalAnnotManager ()
| ExternalAnnotManager (const ExternalAnnotManager &other)
| ExternalAnnotManager (TRN_ExternalAnnotManager impl)
ExternalAnnotManager & | operator= (const ExternalAnnotManager &other)
| ~ExternalAnnotManager ()
void | Destroy ()
void | MergeXFDF (UString xfdf_content)
UString | Undo ()
UString | GetLastXFDF () const
UString | GetLastJSON () const
UString | Redo ()
UString | GetNextRedoInfo ()
UString | GetNextUndoInfo ()
UString | TakeSnapshot (UString payload)

## Public Attributes
TRN_ExternalAnnotManager | m_impl

## Detailed Description

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

Definition at line 25 of file ExternalAnnotManager.h.

## Member Enumeration Documentation

## ◆ Mode

enum pdftron::PDF::ExternalAnnotManager::Mode

Enumerator
e_user_only |
e_admin_undo_others |
e_admin_undo_own |

Definition at line 28 of file ExternalAnnotManager.h.

## Constructor & Destructor Documentation

## ◆ ExternalAnnotManager() [1/3]

pdftron::PDF::ExternalAnnotManager::ExternalAnnotManager | ( |  | ) |

## ◆ ExternalAnnotManager() [2/3]

pdftron::PDF::ExternalAnnotManager::ExternalAnnotManager | ( | const ExternalAnnotManager & | other | ) |

## ◆ ExternalAnnotManager() [3/3]

pdftron::PDF::ExternalAnnotManager::ExternalAnnotManager | ( | TRN_ExternalAnnotManager | impl | ) |

## ◆ ~ExternalAnnotManager()

pdftron::PDF::ExternalAnnotManager::~ExternalAnnotManager | ( |  | ) |

## Member Function Documentation

## ◆ Destroy()

void pdftron::PDF::ExternalAnnotManager::Destroy | ( |  | ) |

## ◆ GetLastJSON()

UString pdftron::PDF::ExternalAnnotManager::GetLastJSON | ( |  | ) | const

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

Returns
  a json command string.

## ◆ GetLastXFDF()

UString pdftron::PDF::ExternalAnnotManager::GetLastXFDF | ( |  | ) | const

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

Returns
  an xfdf command string.

## ◆ GetNextRedoInfo()

UString pdftron::PDF::ExternalAnnotManager::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.

## ◆ GetNextUndoInfo()

UString pdftron::PDF::ExternalAnnotManager::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.

## ◆ MergeXFDF()

void pdftron::PDF::ExternalAnnotManager::MergeXFDF | ( | UString | 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.

## ◆ operator=()

ExternalAnnotManager & pdftron::PDF::ExternalAnnotManager::operator= | ( | const ExternalAnnotManager & | other | ) |

## ◆ Redo()

UString pdftron::PDF::ExternalAnnotManager::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).

## ◆ TakeSnapshot()

UString pdftron::PDF::ExternalAnnotManager::TakeSnapshot | ( | UString | 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.

## ◆ Undo()

UString pdftron::PDF::ExternalAnnotManager::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).

## Member Data Documentation

## ◆ m_impl

TRN_ExternalAnnotManager pdftron::PDF::ExternalAnnotManager::m_impl

Definition at line 103 of file ExternalAnnotManager.h.

The documentation for this class was generated from the following file:

- PDF/ExternalAnnotManager.h