Printable

fun Printable(controller: PrintableController, modifier: Modifier = Modifier, pageDpi: Int = DefaultPageDpi, printBreakpoints: Boolean = false, content: @Composable () -> Unit)

Renders content as-is, and will allow the content to be printed with PrintableController. To start a print job, call PrintableController.print.

Inside content, the hideWhenPrinting modifier and isBeingPrinted property can be used to conditionally change your UI based on whether it's being printed or not.

Parameters

modifier

A Modifier that will be applied to the content normally when composing to the screen, and to every individual page when printing.

pageDpi

The resolution to use for the printed page. Lower values mean smaller text. Has no effect when composing to the screen.

printBreakpoints

If true, horizontal lines are drawn at each breakpoint for debugging. False by default.