Class DiagramPrintSettings
Represents the configuration settings for printing the diagram.
Inheritance
Implements
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class DiagramPrintSettings : Object, IDiagramPrintExportSettingsRemarks
PageSettings - The region within the x,y, width and height values of page settings is printed.
Content - Content of the diagram without empty space around the content is printed.
Examples
<SfDiagramComponent>
<PageSettings Width = "@PageWidth" Height="@PageHeight" Orientation="@pageOrientation" MultiplePage="@IsMultiplePage" ShowPageBreaks="@IsShowPageBreaks" />
</SfDiagramComponent>
@code
{
    double PageWidth = 300;
    double PageHeight = 300;
    PageOrientation pageOrientation = PageOrientation.Landscape;
    bool IsMultiplePage = true;
    bool IsShowPageBreaks = true;
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.FitToPage = true;
     print.PageHeight = PageHeight;
     print.PageWidth = PageWidth;
     print.Orientation = orientation;
     print.Region = DiagramPrintExportRegion.PageSettings;
     print.Margin = new DiagramThickness() { Left = left, Top = top, Right = right, Bottom = bottom };
   }Constructors
DiagramPrintSettings()
Declaration
public DiagramPrintSettings()Properties
ClipBounds
Gets or sets the region that to be printed when Region is ClipBounds.
Declaration
public DiagramRect ClipBounds { get; set; }Property Value
| Type | Description | 
|---|---|
| DiagramRect | The bounds to be used for clipping area sizing. The default is a DiagramRect(0,0,0,0) | 
Remarks
Defines the custom area for print when using ClipBounds region mode.
Examples
<SfDiagramComponent>
<PageSettings />
</SfDiagramComponent>
@code
{
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.ClipBounds = new DiagramRect() { X = 100, Y = 0, Width = 500, Height = 600 };
   }FitToPage
Gets or sets a value indicating whether to fit the entire diagram to a single page during print operations.
Declaration
public bool FitToPage { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | The default value is  | 
Remarks
When true, the diagram is scaled to fit on a single page, potentially reducing element size.
When false, the diagram maintains original scale and may span multiple pages.
Examples
<SfDiagramComponent>
<PageSettings />
</SfDiagramComponent>
@code
{
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.FitToPage = true;
   }Margin
Gets or sets the margin of the page to be printed.
Declaration
public DiagramThickness Margin { get; set; }Property Value
| Type | Description | 
|---|---|
| DiagramThickness | Space around the content to be printed.The default value for margin is 25 for all sides. | 
Remarks
The margin adds space between the diagram and the page edges.
Examples
<SfDiagramComponent>
<PageSettings />
</SfDiagramComponent>
@code
{
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.Margin = new DiagramThickness() { Left = left, Top = top, Right = right, Bottom = bottom };
   }Orientation
Gets or sets the orientation of the page to be printed.
Declaration
public PageOrientation Orientation { get; set; }Property Value
| Type | Description | 
|---|---|
| PageOrientation | One of the PageOrientation enumeration values. The default value is Landscape. | 
Remarks
Determines the page orientation for diagram print. Landscape is preferred for wide diagrams, portrait for tall diagrams.
Examples
<SfDiagramComponent>
<PageSettings  Orientation="@pageOrientation" />
</SfDiagramComponent>
@code
{
    PageOrientation pageOrientation = PageOrientation.Landscape;
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.Orientation = orientation;
   }PageHeight
Gets or sets the height of the page to be printed in the diagram print settings.
Declaration
public double PageHeight { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | A System.Double value representing the height of the page to be printed, measured in pixels. The default value is inherited from Height. | 
Remarks
Controls the vertical dimension of the printed page. Overrides the default PageSettings height when set.
Examples
<SfDiagramComponent>
<PageSettings  Height="@PageHeight"  />
</SfDiagramComponent>
@code
{
    double PageHeight = 300;
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.PageHeight = PageHeight;
   }PageWidth
Gets or sets the width of the page to be printed.
Declaration
public double PageWidth { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Double | The width of the page to be printed. The default value will be Width. | 
Remarks
Controls the horizontal dimension of the printed diagram page. Overrides the default PageSettings width during print operations.
Examples
<SfDiagramComponent>
<PageSettings Width = "@PageWidth" />
</SfDiagramComponent>
@code
{
    double PageWidth = 300;
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.PageWidth = PageWidth;
   }Region
Gets or sets the region in the diagram which need to be printed.
Declaration
public DiagramPrintExportRegion Region { get; set; }Property Value
| Type | Description | 
|---|---|
| DiagramPrintExportRegion | One of the DiagramPrintExportRegion enumeration values. The default value is PageSettings | 
Remarks
PageSettings - The region within the x,y, width and height values of page settings is exported.
Content – Content of the diagram without empty space around the content is exported.
Examples
</SfDiagramComponent>
<PageSettings  />
</SfDiagramComponent>
@code
{
   private async Task OnCustomEntry()
   {
     DiagramPrintSettings print = new DiagramPrintSettings();
     print.Region = DiagramPrintExportRegion.PageSettings;
   }