PdfDriverFactory

Factory for PdfDriver instances.

One factory exists per platform (Android, iOS, eventually Desktop / Web). The factory is the only place where platform-specific initialisation happens — registering custom fonts with the OS, configuring the underlying PDF context, attaching metadata.

Library users normally don't touch a factory directly; the top-level pdf { ... } entry resolves the platform default through com.conamobile.pdfkmp.defaultPdfDriverFactory. Inject a custom factory only for advanced use cases such as test fakes or alternate PDF backends.

Functions

Link copied to clipboard
abstract fun create(metadata: PdfMetadata, customFonts: List<PdfFont.Custom>): PdfDriver

Creates a driver primed for a brand-new document.