usePrint composable provides a flexible way to add printing functionality to your Vue 3 components with full TypeScript support.
Basic usage
Import and use the composable in your script setup:Returned functions
TheusePrint composable returns an object with several functions:
printComponent
Print a Vue component reference:getBridgeStatus
Check if the bridge is available (requires bridge plugin):getAvailablePrinters
Get list of available printers (requires bridge plugin):printDirect
Print directly to a printer without dialog (requires bridge plugin):TypeScript support
The composable has full TypeScript definitions:With reactive state
Manage printing state with Vue reactivity:Composable with computed content
Print dynamically computed content:Reusable composable wrapper
Create your own custom composable:Next steps
Event callbacks
Handle before/after print events
Custom styles
Customize print layout with CSS
API Reference
View complete API documentation
TypeScript
TypeScript type definitions