# pdfviewer-silent-printing

> PdfViewer with silent printing without showing print dialog, maintaining document quality.

**Framework:** wpf  **Component:** PdfViewer  **Variant:** silent-printing

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/wpf/pdfviewer-silent-printing.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.PdfViewer.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/pdfviewer-silent-printing/PdfViewer.xaml

```xaml
<UserControl
    x:Class="SilentPrinting.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cc="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"
    xmlns:syncfusion="http://schemas.syncfusion.com/wpf">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- Header -->
        <Border Grid.Row="0"
                Padding="14,12"
                Background="#D24726">
            <TextBlock Foreground="White"
                       FontSize="16"
                       FontWeight="SemiBold"
                       Text="Silent Printing" />
        </Border>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="320" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <!-- The print options and the print action -->
            <DockPanel Grid.Column="0" Margin="14">
                <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
                    <TextBlock x:Name="StatusTextBlock"
                               Margin="0,0,12,0"
                               VerticalAlignment="Center"
                               Foreground="#52606D" />
                    <Button x:Name="PrintButton"
                            Padding="16,6"
                            Click="PrintButton_Click"
                            Content="Print" />
                </StackPanel>

                <StackPanel>
                    <TextBlock Margin="0,12,0,0"
                               TextWrapping="Wrap"
                               Foreground="#52606D"
                               Text="Essential PDF Viewer enables print support. The pages can be printed using the PrintDialog or silently, straight to the default printer. Select a print option and press Print." />

                    <TextBlock Margin="0,14,0,6"
                               FontWeight="SemiBold"
                               Text="Print range" />
                    <RadioButton x:Name="allPagesRadio"
                                 Margin="0,0,0,6"
                                 GroupName="printRange"
                                 IsChecked="True"
                                 Content="Print all pages" />
                    <StackPanel Orientation="Horizontal">
                        <RadioButton x:Name="pageRangeRadio"
                                     VerticalAlignment="Center"
                                     GroupName="printRange"
                                     Content="Print pages" />
                        <TextBox x:Name="fromPageTextBox"
                                 Width="44"
                                 Margin="8,0,4,0"
                                 VerticalContentAlignment="Center"
                                 TextAlignment="Center"
                                 Text="1" />
                        <TextBlock Margin="0,0,4,0" VerticalAlignment="Center" Text="to" />
                        <TextBox x:Name="toPageTextBox"
                                 Width="44"
                                 VerticalContentAlignment="Center"
                                 TextAlignment="Center"
                                 Text="1" />
                    </StackPanel>
                    <RadioButton x:Name="currentPageRadio"
                                 Margin="0,8,0,0"
                                 GroupName="printRange"
                                 Content="Print the current page" />

                    <TextBlock Margin="0,14,0,6"
                               FontWeight="SemiBold"
                               Text="Printer" />
                    <TextBlock x:Name="printerNameTextBlock"
                               Foreground="#52606D"
                               TextWrapping="Wrap" />
                </StackPanel>
            </DockPanel>

            <!-- The document that is printed -->
            <cc:PdfViewerControl x:Name="pdfViewer"
                                 Grid.Column="1"
                                 Margin="0,14,14,14"
                                 AllowDrop="True"
                                 BorderBrush="#D5DCE4"
                                 BorderThickness="1"
                                 ShowToolbar="False"
                                 WarnBeforeClose="False"
                                 ZoomMode="FitWidth"
                                 DocumentLoaded="pdfViewer_DocumentLoaded" />
        </Grid>
    </Grid>
</UserControl>

```
