renderAnnotations

fun renderAnnotations(page: PdfPage, deviceCtm: KiteMatrix = defaultDeviceCtm(page), annotations: (PdfAnnotation) -> Boolean = { true })

Paints only the annotations annotations accepts, and none of the page's own content.

A viewer that keeps a drawn page and redraws its form on top uses this: the page is rasterized once without its widgets, and each changed field is painted over it, so a value a script writes twenty times a second costs twenty small redraws and not twenty pages.