KitePageRasterizer
Imperative page → ImageBitmap pipeline. This is the raster engine behind KiteDocView; it is public so apps with custom viewers (own pagers, thumbnail grids, PNG export jobs) don't have to re-implement the CTM/flip/hairline math themselves.
Obtain one inside composition with rememberKitePageRasterizer, or construct it directly off-composition when you already hold a TextMeasurer.
rasterize requires the platform UI thread and refuses other callers before drawing. On desktop JVM this is the AWT event dispatch thread, including headless exports. rasterizeOffMain is the suspend entry point for any calling thread; it moves the work to kitepdfRasterDispatcher (a background pool on JVM/Android/Apple, Main on JS/Wasm) so a complex page does not jank scrolling or pinch. KiteDocView uses that path. A page with text in a system font draws there too, since the platform's own text engine shapes that text on any thread (#131, #487).
Constructors
Binary-compatible constructor using the default bitmap ceiling.
Functions
rasterize with an application canvas wrapper. See KiteCanvasDecorator for ordering, repeatable paint passes and threading requirements.
rasterize, off the main thread where the platform allows. Cancelling the calling coroutine stops a PDF page between operators and throws a CancellationException instead of returning a partial bitmap (#188).
rasterizeOffMain with an application canvas wrapper. See KiteCanvasDecorator for ordering, repeatable paint passes and threading requirements.
Exports the accepted live values of formState from any coroutine dispatcher. The state is copied before waiting for a raster slot, so both paint passes use the same field values, choice selections and visibility (ISO 32000-1, 12.7). Later edits do not change an export already in progress. Other page types ignore the form state. Unlike the viewer's cached page bitmap, this includes widgets.