Package-level declarations

Types

Link copied to clipboard
sealed class PdfDrawable

Lazily-loaded drawable that can be embedded in a PdfKmp document regardless of whether the source resource is XML (parsed into a VectorImage) or a raster bitmap (kept as raw bytes for the platform decoder).

Functions

Link copied to clipboard
fun <Error class: unknown class>.drawable(resource: <Error class: unknown class>, width: <Error class: unknown class>? = null, height: <Error class: unknown class>? = null, tint: <Error class: unknown class>? = null, contentScale: <Error class: unknown class> = ContentScale.Fit, strokeMode: <Error class: unknown class> = VectorStrokeMode.Inherit, allowDownScale: Boolean = true)

Embeds a typed Compose Multiplatform DrawableResource inline inside the synchronous pdf { } DSL — auto-detects vector vs raster from the file's leading bytes at preflight time.

fun <Error class: unknown class>.drawable(drawable: PdfDrawable, width: <Error class: unknown class>? = null, height: <Error class: unknown class>? = null, tint: <Error class: unknown class>? = null, contentScale: <Error class: unknown class> = ContentScale.Fit, strokeMode: <Error class: unknown class> = VectorStrokeMode.Inherit, allowDownScale: Boolean = true)

Embeds a PdfDrawable in the document, dispatching to vector(...) or image(...) based on the variant. Useful when the call site loads a resource via DrawableResource.toPdfDrawable without knowing in advance whether the asset is XML or a raster.

Link copied to clipboard
fun <Error class: unknown class>.image(resource: <Error class: unknown class>, width: <Error class: unknown class>? = null, height: <Error class: unknown class>? = null, contentScale: <Error class: unknown class> = ContentScale.Fit, allowDownScale: Boolean = true)

Inline overload of image(...) that takes a typed DrawableResource pointing at a raster bitmap (PNG / JPEG / WEBP / HEIF). Resolves through the suspend preflight pass — call inside com.conamobile.pdfkmp.pdfAsync.

Link copied to clipboard
suspend fun <Error class: unknown class>.toBytes(): ByteArray

Reads the bytes of a Compose Multiplatform DrawableResource from the platform's default resource environment.

Link copied to clipboard
suspend fun <Error class: unknown class>.toPdfDrawable(): PdfDrawable

Loads a Compose Multiplatform DrawableResource without caring whether it's XML (parsed into a VectorImage) or a raster bitmap (kept as raw bytes). The leading bytes of the file are inspected — anything that looks like XML is parsed as a vector, everything else is returned as a PdfDrawable.Raster.

Link copied to clipboard
suspend fun <Error class: unknown class>.toVectorImage(): <Error class: unknown class>

Loads a Compose Multiplatform DrawableResource containing Android <vector> XML or W3C <svg> and parses it into a VectorImage ready to be drawn by vector(image = ...).

Link copied to clipboard
fun <Error class: unknown class>.vector(resource: <Error class: unknown class>, width: <Error class: unknown class>? = null, height: <Error class: unknown class>? = null, tint: <Error class: unknown class>? = null, strokeMode: <Error class: unknown class> = VectorStrokeMode.Inherit)

Inline overload of vector(...) that takes a typed DrawableResource pointing at <vector> or <svg> XML. Resolves through the suspend preflight pass — call inside com.conamobile.pdfkmp.pdfAsync.