parseXfdfAsync

fun parseXfdfAsync(document: PdfDocument, dataProvider: DataProvider, ignorePageRotation: Boolean = false): Single<List<Annotation>>

Parses XFDF file served by the data provider and returns a list of annotations that can be added to the document. This doesn't automatically add all the annotations to the document. To do that use com.pspdfkit.annotations.AnnotationProvider.addAnnotationToPage.

The returned completable will emit a XfdfFormatterException when encountering an unexpected error while importing the XFDF.

Return

Single that finishes after the parsing is performed, either by returning array of parsed annotation in onSuccess(), or onError().

Parameters

document

Document for which we're parsing XFDF file.

dataProvider

Data provider serving the source XFDF file.

ignorePageRotation

Whether to ignore page transform matrices (rotation and CropBox offset) when parsing.