XfdfFormatter

Provides methods for exporting data in XFDF format from the document as well as parsing the existing XFDF data and applying it to the document.

Functions

Link copied to clipboard
fun parseXfdf(document: PdfDocument, dataProvider: DataProvider, ignorePageRotation: Boolean = false): 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.

Link copied to clipboard
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.

Link copied to clipboard
fun writeXfdf(document: PdfDocument, annotations: List<Annotation>, formFields: List<FormField>, outputStream: OutputStream, ignorePageRotation: Boolean = false)

Generates an XFDF file out of provided annotations and form fields and writes the output to the given output stream.

Link copied to clipboard
fun writeXfdfAsync(document: PdfDocument, annotations: List<Annotation>, formFields: List<FormField>, outputStream: OutputStream, ignorePageRotation: Boolean = false): Completable

Generates an XFDF file out of provided annotations and form fields and writes the output to the given output stream.