Skip to content

Commit 8b4b951

Browse files
1032245: Updated review changes for Print in Blazor PDF Viewer
1 parent 2e3c69b commit 8b4b951

9 files changed

Lines changed: 18 additions & 119 deletions

File tree

Document-Processing-toc.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,6 @@
12391239
<li><a href="/document-processing/pdf/pdf-viewer/blazor/print/overview">Print</a>
12401240
<ul>
12411241
<li><a href="/document-processing/pdf/pdf-viewer/blazor/print/print-modes">Print Modes</a></li>
1242-
<li><a href="/document-processing/pdf/pdf-viewer/blazor/print/print-quality">Print Quality</a></li>
12431242
<li><a href="/document-processing/pdf/pdf-viewer/blazor/print/enable-print-rotation">Print rotation</a></li>
12441243
<li><a href="/document-processing/pdf/pdf-viewer/blazor/print/events">Events</a></li>
12451244
</ul>
-302 KB
Loading
-213 KB
Loading
-241 KB
Loading

Document-Processing/PDF/PDF-Viewer/blazor/print/enable-print-rotation.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ domainurl: ##DomainURL##
1010

1111
# Enable print rotation in Blazor PDF Viewer
1212

13-
This guide shows how to enable automatic rotation of landscape pages during printing so they match the paper orientation and reduce clipping. Use [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation) when printing documents that include landscape pages and you want them rotated to match the printer paper orientation.
13+
The [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation) property in the Blazor PDF Viewer controls how landscape pages are handled during printing. When enabled, the viewer automatically rotates landscape-oriented pages to match the printer’s paper orientation. This ensures that content fits properly on the page and avoids clipping.
1414

15-
## Prerequisites
15+
By default, this property is set to **true**, meaning landscape pages are automatically adjusted for optimal printing. If set to **false**, pages retain their original orientation and are printed without any automatic rotation.
1616

17-
- A Blazor app with the Syncfusion PDF Viewer component integrated.
17+
## When to use print rotation
1818

19-
## Steps to enable print rotation
19+
Enable this feature when printing documents that include landscape pages and you want them to align with the printer’s paper orientation. This helps improve readability and ensures that content is not cut off during printing.
2020

21-
1. Configure the [SfPdfViewer](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.SfPdfViewer.html) component in your Blazor application.
22-
2. Set [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation)="true" in the PDF Viewer during initialization.
21+
## Enabling print rotation
22+
23+
You can enable print rotation during the initialization of the PDF Viewer component by setting the `EnablePrintRotation` property to **true**.
2324

24-
## Example
2525

2626
{% tabs %}
2727
{% highlight razor %}
@@ -42,14 +42,8 @@ This guide shows how to enable automatic rotation of landscape pages during prin
4242

4343
[View Sample in GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Print)
4444

45-
## Troubleshooting
46-
47-
- If you need to preserve original page orientation for archival printing, set [EnablePrintRotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrintRotation)="false".
48-
- Confirm that the PDF Viewer component is properly configured with the correct resource URL.
49-
5045
## See also
5146

5247
- [Overview](./overview)
53-
- [Print quality](./print-quality)
5448
- [Print modes](./print-modes)
5549
- [Print events](./events)

Document-Processing/PDF/PDF-Viewer/blazor/print/events.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,5 @@ The following example illustrates how to handle the `PrintEnd` event.
7979
## See also
8080

8181
- [Overview](./overview)
82-
- [Print quality](./print-quality)
8382
- [Enable print rotation](./enable-print-rotation)
8483
- [Print modes](./print-modes)

Document-Processing/PDF/PDF-Viewer/blazor/print/overview.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,14 @@ To start printing from code, call the [PrintAsync()](https://help.syncfusion.com
6868

6969
- Enable or disable printing with the [EnablePrint](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_EnablePrint) property
7070
- Start printing from UI (toolbar Print) or programmatically using [PrintAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.SfPdfViewer.html#Syncfusion_Blazor_SfPdfViewer_SfPdfViewer_PrintAsync).
71-
- Control output quality with the [PrintScaleFactor](./print-quality) property (0.5–5)
7271
- Auto‑rotate pages during print using [EnablePrintRotation](./enable-print-rotation)
7372
- Choose where printing happens with [PrintMode](./print-modes) (Default or NewWindow)
7473
- Track the life cycle with [PrintStart and PrintEnd events](./events)
7574

76-
## Troubleshooting
77-
78-
- Ensure the resource URL value matches the deployed `ej2-pdfviewer-lib` version.
79-
- Calling [PrintAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.SfPdfViewer.html#Syncfusion_Blazor_SfPdfViewer_SfPdfViewer_PrintAsync) launches the browser print dialog; behavior varies by browser and may be affected by popup blockers or browser settings.
80-
8175
[View Sample in GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Print)
8276

8377
## See Also
8478

85-
- [Print quality](./print-quality)
8679
- [Enable print rotation](./enable-print-rotation)
8780
- [Print modes](./print-modes)
8881
- [Print events](./events)

Document-Processing/PDF/PDF-Viewer/blazor/print/print-modes.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,44 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Print Modes in the Blazor PDF Viewer
11+
# Print Modes in Blazor PDF Viewer
1212

13-
This guide shows how to set the PDF Viewer [`PrintMode`](https://ej2.syncfusion.com/blazor/documentation/api/pdfviewer/pdfviewer#printmode) so PDFs print from the current window or from a new window/tab.
13+
The [`PrintMode`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) property determines how the print dialog is opened in the PDF Viewer. By default, it is set to PrintMode.Default, which prints the document from the same browser window.
1414

15-
## Prerequisites
15+
## Available print modes
1616

17-
- A Blazor app with the Syncfusion PDF Viewer component integrated.
17+
- [PrintMode.Default](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintMode.html): Prints the document from the current browser window.
18+
- [PrintMode.NewWindow](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PrintMode.html): Opens the print dialog in a new window or tab. This may be affected by browser pop-up blockers.
1819

19-
## Steps to set print mode
20+
## Set print mode
2021

21-
**Step 1:** Decide which [PrintMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) you need:
22-
- `PrintMode.Default` — print from the same browser window.
23-
- `PrintMode.NewWindow` — print from a new window or tab (may be blocked by pop-up blockers).
24-
25-
**Step 2:** Set [PrintMode](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.SfPdfViewer.PdfViewerBase.html#Syncfusion_Blazor_SfPdfViewer_PdfViewerBase_PrintMode) during viewer initialization (recommended):
22+
You can configure the print mode during the initialization of the PDF Viewer component by setting the `PrintMode` property.
2623

2724
{% tabs %}
2825
{% highlight razor %}
26+
2927
@using Syncfusion.Blazor.SfPdfViewer
3028

3129
<SfPdfViewer2 Height="100%"
3230
Width="100%"
3331
DocumentPath="@DocumentPath"
3432
PrintMode="PrintMode.NewWindow" />
3533

36-
@code{
34+
@code {
3735
public string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf";
3836
}
39-
{% endhighlight %}
40-
{% endtabs %}
41-
42-
![Print in New Window](../images/print-newwindow.gif)
4337

44-
**Step 3:** Print mode can also be changed at runtime after the viewer is created:
45-
46-
{% tabs %}
47-
{% highlight razor %}
48-
// switch to NewWindow at runtime
49-
pdfViewerRef.PrintMode = "NewWindow";
5038
{% endhighlight %}
5139
{% endtabs %}
5240

53-
## Quick reference
54-
55-
- `PrintMode.Default`: Print from the same window (default).
56-
- `PrintMode.NewWindow`: Print from a new window or tab.
41+
![Print in New Window](../images/print-newwindow.gif)
5742

58-
N> Browser pop-up blockers must allow new windows or tabs when using `PrintMode = PrintMode.NewWindow`.
43+
> **Note:** Ensure that browser pop-up blockers allow new windows or tabs when using `PrintMode.NewWindow`.
5944
6045
[View samples on GitHub](https://github.com/SyncfusionExamples/blazor-pdf-viewer-examples/tree/master/Print)
6146

6247
## See also
6348

6449
- [Overview](./overview)
65-
- [Print quality](./print-quality)
6650
- [Enable print rotation](./enable-print-rotation)
6751
- [Print events](./events)

Document-Processing/PDF/PDF-Viewer/blazor/print/print-quality.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)