drawable
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.
Parameters that apply to only one variant are silently ignored for the other — tint and strokeMode take effect for vector drawables only, and contentScale takes effect for raster drawables only.
Parameters
the resource loaded via toPdfDrawable.
same logic mirrored for the vertical axis.
vector-only — uniform colour applied to every fill.
raster-only — how the bitmap fills the box. Defaults to ContentScale.Fit.
vector-only — whether the stroke is inherited, suppressed, or recoloured at draw time.
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.
Returns immediately. The resource bytes are read during the suspend preflight pass that pdfAsync { } runs before layout, so the call site never has to be suspend itself. Build the document with com.conamobile.pdfkmp.pdfAsync instead of com.conamobile.pdfkmp.pdf when using this overload — the synchronous entry point has no preflight pass and throws a clear error when it sees a deferred node.
Parameter semantics match the eager drawable overload above — tint / strokeMode apply only when the resource turns out to be a vector, contentScale only when it turns out to be a raster.
Parameters
typed Res.drawable.* reference produced by the Compose Multiplatform Resources plugin in the consumer project.