From a3a3425f88687dbee76a2ada38df52fb7d7967c0 Mon Sep 17 00:00:00 2001 From: Tamilselvan-Durairaj <153176971+Tamilselvan-Durairaj@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:23:29 +0530 Subject: [PATCH 1/5] 978978: Modified the print documentation for the blazor pdfviewer --- .../PDF/PDF-Viewer/blazor/print.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/print.md b/Document-Processing/PDF/PDF-Viewer/blazor/print.md index ec68af2b6..bc8549f7d 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/print.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/print.md @@ -52,6 +52,66 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` +## EnablePrintRotation in the Blazor Pdfviewer + +[EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation) controls whether landscape pages are auto-rotated to best fit when printing. Default: true. Set to false to preserve the original page orientation and suppress automatic rotation during print. + +```cshtml + +@using Syncfusion.Blazor.SfPdfViewer + + + +@code{ + public string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf"; +} + +``` + +## Print modes in the Blazor Pdfviewer + +[PrintMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) specifies how the print dialog is opened. Default: PrintMode.Default (prints from the same window). Supported values: + +- [PrintMode.Default](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintMode.html#Syncfusion_Blazor_SfPdfViewer_PrintMode_Default) — Opens the print dialog in the same window. +- [PrintMode.NewWindow](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintMode.html#Syncfusion_Blazor_SfPdfViewer_PrintMode_NewWindow) — Opens the print dialog from a new browser window/tab, which can be useful depending on browser popup policies. + +```cshtml + +@using Syncfusion.Blazor.SfPdfViewer + + + +@code{ + public string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf"; +} + +``` + +## PrintScaleFactor in the Blazor Pdfviewer + +[PrintScaleFactor](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintScaleFactor) sets the scale used when rendering pages for printing. By default the scale factor set as 1.0 (prints at the on-screen scale). Valid range from 0.5 to 5.0. Higher values can improve output clarity for documents with smaller page dimensions and may increase print processing time. + +```cshtml + +@using Syncfusion.Blazor.SfPdfViewer + + + +@code{ + public string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf"; +} + +``` + ## See also * [Download in Blazor SfPdfViewer component](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/blazor/saving-pdf-file#download-in-blazor-sfpdfviewer-component) From b47d6b48f53646cdd28b7580f33687d09f11813a Mon Sep 17 00:00:00 2001 From: Tamilselvan-Durairaj <153176971+Tamilselvan-Durairaj@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:32:04 +0530 Subject: [PATCH 2/5] 978978: Update the CI failures --- Document-Processing/PDF/PDF-Viewer/blazor/print.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/print.md b/Document-Processing/PDF/PDF-Viewer/blazor/print.md index bc8549f7d..c863d54b0 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/print.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/print.md @@ -52,7 +52,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## EnablePrintRotation in the Blazor Pdfviewer +## EnablePrintRotation in the Blazor SfPdfviewer [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation) controls whether landscape pages are auto-rotated to best fit when printing. Default: true. Set to false to preserve the original page orientation and suppress automatic rotation during print. @@ -71,7 +71,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## Print modes in the Blazor Pdfviewer +## Print modes in the Blazor SfPdfviewer [PrintMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) specifies how the print dialog is opened. Default: PrintMode.Default (prints from the same window). Supported values: @@ -93,7 +93,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## PrintScaleFactor in the Blazor Pdfviewer +## PrintScaleFactor in the Blazor SfPdfviewer [PrintScaleFactor](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintScaleFactor) sets the scale used when rendering pages for printing. By default the scale factor set as 1.0 (prints at the on-screen scale). Valid range from 0.5 to 5.0. Higher values can improve output clarity for documents with smaller page dimensions and may increase print processing time. From abe7f667e3d344b960b0c302d82aba49791f2984 Mon Sep 17 00:00:00 2001 From: Tamilselvan-Durairaj <153176971+Tamilselvan-Durairaj@users.noreply.github.com> Date: Wed, 1 Oct 2025 13:38:58 +0530 Subject: [PATCH 3/5] 978978: Update the CI failures --- Document-Processing/PDF/PDF-Viewer/blazor/print.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/print.md b/Document-Processing/PDF/PDF-Viewer/blazor/print.md index c863d54b0..3b1fce1c9 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/print.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/print.md @@ -52,7 +52,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## EnablePrintRotation in the Blazor SfPdfviewer +## EnablePrintRotation in the Blazor SfPdfViewer [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation) controls whether landscape pages are auto-rotated to best fit when printing. Default: true. Set to false to preserve the original page orientation and suppress automatic rotation during print. @@ -71,7 +71,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## Print modes in the Blazor SfPdfviewer +## Print modes in the Blazor SfPdfViewer [PrintMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) specifies how the print dialog is opened. Default: PrintMode.Default (prints from the same window). Supported values: @@ -93,7 +93,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## PrintScaleFactor in the Blazor SfPdfviewer +## PrintScaleFactor in the Blazor SfPdfViewer [PrintScaleFactor](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintScaleFactor) sets the scale used when rendering pages for printing. By default the scale factor set as 1.0 (prints at the on-screen scale). Valid range from 0.5 to 5.0. Higher values can improve output clarity for documents with smaller page dimensions and may increase print processing time. From 3561ee7b0c609aa2b64ec9d5ecb5b518b4f108d7 Mon Sep 17 00:00:00 2001 From: Tamilselvan-Durairaj <153176971+Tamilselvan-Durairaj@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:07:43 +0530 Subject: [PATCH 4/5] 978978: Update the events of the print --- .../PDF/PDF-Viewer/blazor/print.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/print.md b/Document-Processing/PDF/PDF-Viewer/blazor/print.md index 3b1fce1c9..532fd93e4 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/print.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/print.md @@ -112,6 +112,67 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` +## Print Events in Blazor Pdfviewer + +The following events are available in the SfPdfViewer component. + +|Name|Description| +|---|---| +|PrintStart|Triggers when a print action starts.| +|PrintEnd|Triggers when a print action is completed.| + +### PrintStart Event + +The [PrintStart](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerEvents.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerEvents_PrintStart) event triggers when the print action is started. + +#### Event Arguments + +See [PrintStartEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintStartEventArgs.html) for details such as Filename, Cancel option. + +The following example illustrates how to handle the PrintStart event. + +```cshtml + +@using Syncfusion.Blazor.SfPdfViewer + + + +@code{ + private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succintly.pdf"; + public async Task PrintStart(PrintStartEventArgs args) + { + Console.WriteLine($"Printed File Name: {args.FileName}"); + } +} + +``` + +### PrintEnd Event + +The [PrintEnd](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerEvents.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerEvents_PrintEnd) event triggers when an annotation is added to a page in the PDF document. + +#### Event Arguments + +See [PrintEndEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintEndEventArgs.html) for details such as Filename. + +The following example illustrates how to handle the PrintEnd event. + +```cshtml + +@using Syncfusion.Blazor.SfPdfViewer + + + +@code{ + private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succintly.pdf"; + public async Task PrintEnd(PrintEndEventArgs args) + { + Console.WriteLine($"Printed File Name: {args.FileName}"); + } +} + +``` + ## See also * [Download in Blazor SfPdfViewer component](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/blazor/saving-pdf-file#download-in-blazor-sfpdfviewer-component) From 545d0c24d6f2550a7019460cae05cf53fe6e7aff Mon Sep 17 00:00:00 2001 From: Tamilselvan-Durairaj <153176971+Tamilselvan-Durairaj@users.noreply.github.com> Date: Wed, 1 Oct 2025 15:21:26 +0530 Subject: [PATCH 5/5] 978978: Update print CI failures --- Document-Processing/PDF/PDF-Viewer/blazor/print.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/print.md b/Document-Processing/PDF/PDF-Viewer/blazor/print.md index 532fd93e4..95efecff4 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/print.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/print.md @@ -112,7 +112,7 @@ The SfPdfViewer supports printing the loaded PDF by default. Enable or disable t ``` -## Print Events in Blazor Pdfviewer +## Print Events in Blazor SfPdfViewer The following events are available in the SfPdfViewer component.