PdfPrintAction

fun interface PdfPrintAction

Action that hands a PDF off to the host platform's native print pipeline.

The viewer captures one of these via rememberPdfPrintAction and wires it to the optional print button. Each invocation streams bytes into the platform's print subsystem and surfaces its system UI — PrintManager + a PrintDocumentAdapter on Android, UIPrintInteractionController on iOS, java.awt.print.PrinterJob (driving PdfBox's PDFPageable) on Desktop.

Parameters

bytes

encoded PDF payload to print. The bytes are read fresh on every invocation so callers can keep mutating their own buffer without affecting an in-flight print job.

fileName

user-visible job name shown in the print dialog / queue (must include the .pdf extension on the platforms that surface it).

Functions

Link copied to clipboard
abstract operator fun invoke(bytes: ByteArray, fileName: String)