write Xfdf
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.
Warning: this method runs on the current thread. If the current thread is the UI thread, it's recommended that you offload it to some other one, because this operation can take some time and thus block the UI.
Parameters
document
Document containing given annotations and form fields.
annotations
List of annotations to be parsed. The annotations need to be attached to the document, otherwise an exception is thrown.
form Fields
List of form fields to be parsed.
output Stream
Output stream for writing the generated XFDF file.
ignore Page Rotation
Whether to ignore page transform matrices (rotation and CropBox offset) when parsing.
See also
Throws
If one of the passed annotations isn't attached to the document.