defaultPdfDriverFactory
Returns the Android implementation of PdfDriverFactory, backed by android.graphics.pdf.PdfDocument.
The factory needs the application android.content.Context to create a cache directory for temporary font files; that context is captured at library start through AndroidX App Startup and reused across calls.
Returns the platform's default PdfDriverFactory.
Android: a factory backed by android.graphics.pdf.PdfDocument and android.graphics.Canvas.
iOS: a factory backed by
UIGraphicsPDFRendererand Core Graphics.
Library users almost never call this directly — pdf uses it as the default. Tests and advanced consumers may pass a different factory through pdf's factory parameter to swap in a stub or an alternative backend.
Returns the iOS implementation of PdfDriverFactory, backed by UIGraphicsBeginPDFContextToData and Core Graphics.
The factory is stateless; the cost of resolving it is negligible, so callers do not need to cache the returned instance.
Returns the JVM / Desktop implementation of PdfDriverFactory, backed by Apache PdfBox.
The factory is stateless and pure-Java, so the same code path runs identically on macOS, Windows and Linux with no native libraries. Callers almost never invoke this directly — pdf uses it as the default.
Web (Kotlin/Wasm) default backend.
Browsers expose no PDF-writing API to Wasm, so documents render through the pure-Kotlin kmpwriter backend: Standard-14 Helvetica text (WinAnsi/Latin coverage), every vector feature (shapes, gradients, QR codes, barcodes, charts, freeDraw), JPEG and 8-bit RGB/gray PNG images, links, named destinations, the outline, and the info dictionary.
Not yet supported on this backend (warned through com.conamobile.pdfkmp.PdfLog and skipped): custom font embedding (text falls back to Helvetica), characters outside WinAnsi, palette/alpha PNGs, interactive AcroForm widgets (the static visuals still draw), encryption, and attachments.