PdfLog

object PdfLog

Diagnostics hook for conditions PdfKmp handles gracefully but silently — undecodable image bytes, missing fonts falling back to the default, and similar "the document still renders, but not the way you meant" cases.

Off by default: a PDF library should not write to an app's console uninvited. Install a logger during development to surface the warnings:

PdfLog.logger = { message -> println("PdfKmp: $message") }

Properties

Link copied to clipboard
var logger: (String) -> Unit?

Receives one human-readable line per swallowed problem. null (default) disables logging entirely.

Functions

Link copied to clipboard
fun warn(message: String)

Forwards message to the installed logger, if any.