How to Perform print in the same window using PDF Viewer
14 Aug 20261 minute to read
Use the PrintMode property on SfPdfViewer2 to control whether printing occurs in the same window or a new window. The PrintMode enum supports the following values:
- Default - Prints from the same window.
- NewWindow - Opens printing in a new browser window or tab (may be affected by pop-up blockers).
@using Syncfusion.Blazor.SfPdfViewer
<SfPdfViewer2 PrintMode="PrintMode.Default"
DocumentPath="@DocumentPath"
Height="100%"
Width="100%"></SfPdfViewer2>
@code {
private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf";
}