ComposePrintAdapter

constructor(activity: ComponentActivity, documentName: String, pageModifier: Modifier = Modifier, pageDpi: Int = DefaultPageDpi, printBreakpoints: Boolean = false, mainContext: CoroutineContext = Dispatchers.Main, ioDispatcher: CoroutineDispatcher = Dispatchers.IO, content: @Composable () -> Unit)

Parameters

activity

The ComponentActivity used to create various printing resources.

documentName

The file name that will be reported to the printing system, e.g. to use as the default for the Save to PDF virtual printer.

pageModifier

A Modifier that will be applied to each individual page of the printed content. responsivePadding is a good choice.

pageDpi

The resolution to use for the Density of the composable.

printBreakpoints

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

mainContext

The CoroutineContext to interact with the composable and view system on.