PspdfkitWidgetController class abstract

A controller for a PSPDFKit widget.

Constructors

PspdfkitWidgetController()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAnnotation(Map<String, dynamic> jsonAnnotation) Future<bool?>
Adds the given annotation to the presented document. jsonAnnotation can either be a JSON string or a valid JSON Dictionary (iOS) / HashMap (Android).
addEventListener(String eventName, dynamic callback(dynamic)) → void
Sets the annotation preset configurations for the given annotation tools. @param eventName The name of the event to listen to.
applyInstantJson(String annotationsJson) Future<bool?>
Applies Instant document JSON to the presented document.
exportInstantJson() Future<String?>
Exports Instant document JSON from the presented document.
exportXfdf(String xfdfPath) Future<bool?>
Exports annotations to the XFDF file at the given path.
getAllUnsavedAnnotations() Future
Returns a list of JSON dictionaries for all the unsaved annotations in the presented document.
getAnnotations(int pageIndex, String type) Future
Returns a list of JSON dictionaries for all the annotations of the given type on the given pageIndex.
getFormFieldValue(String fullyQualifiedName) Future<String?>
Gets the form field value by specifying its fully qualified name.
getVisibleRect(int pageIndex) Future<Rect>
Gets the visible rect of the given page. pageIndex The index of the page. This is a zero-based index. Returns a Future that completes with the visible rect of the given page.
getZoomScale(int pageIndex) Future<double>
Gets the zoom scale of the given page. pageIndex The index of the page. This is a zero-based index. Returns a Future that completes with the zoom scale of the given page.
importXfdf(String xfdfPath) Future<bool?>
Imports annotations from the XFDF file at the given path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processAnnotations(AnnotationType type, AnnotationProcessingMode processingMode, String destinationPath) Future<bool?>
Processes annotations of the given type with the provided processing mode and stores the PDF at the given destination path.
removeAnnotation(dynamic jsonAnnotation) Future<bool?>
Removes the given annotation from the presented document. jsonAnnotation can either be a JSON string or a valid JSON Dictionary (iOS) / HashMap (Android).
save() Future<bool?>
Saves the document back to its original location if it has been changed. If there were no changes to the document, the document file will not be modified.
setAnnotationConfigurations(Map<AnnotationTool, AnnotationConfiguration> configurations) Future<bool?>
Sets the annotation preset configurations for the given annotation tools. @param configurations A map of annotation tools and their corresponding configurations. @param modifyAssociatedAnnotations Whether to modify the annotations associated with the old configuration. Only used for Android. @return True if the configurations were set successfully, false otherwise.
setFormFieldValue(String value, String fullyQualifiedName) Future<bool?>
Sets the value of a form field by specifying its fully qualified field name.
toString() String
A string representation of this object.
inherited
zoomToRect(int pageIndex, Rect rect) Future<void>
Zooms to the given rect on the given page. pageIndex The index of the page. This is a zero-based index. rect The rect to zoom to. Returns a Future that completes when the zoom operation is done.

Operators

operator ==(Object other) bool
The equality operator.
inherited