
Used to print a document or a local view
<body>
<app>
@(await Html.RenderComponentAsync<App>(RenderMode.ServerPrerendered))
</app>
</body>
<PrintButton Icon="fa-solid fa-print" Text="Print" PreviewUrl="/printview" />
Print the page by clicking the print button
Demo
After clicking the print button below, a new page pops up for print preview, confirms that it is correct, and then clicks the print button in the print preview page for printer selection
PrintTurn on printing by setting up the ShowPrint
Demo
In this example, the pop-up window content is a custom component DataDialogComponent
the Footer
where the button itself is located is hidden, so the Print
button built into the pop-up window cannot be displayed, and setting the ShowPrintButtonInHeader
makes the printThe button appears in the title bar
By setting up the content components to print, call the print servicedirectly print jobs
Demo
B station related video link
交流群