menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DiagramExportSettings - API Reference

    Show / Hide Table of Contents

    Class DiagramExportSettings

    Represents the configuration settings for exporting the diagram.

    Inheritance
    System.Object
    DiagramExportSettings
    Implements
    IDiagramPrintExportSettings
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DiagramExportSettings : Object, IDiagramPrintExportSettings
    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<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.PageHeight = PageHeight;
         print.PageWidth = PageWidth;
         print.Orientation = orientation;
       }

    Constructors

    DiagramExportSettings()

    Declaration
    public DiagramExportSettings()

    Properties

    ClipBounds

    Gets or sets the region that to be exported 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)

    Examples
     <SfDiagramComponent>
    <PageSettings />
    </SfDiagramComponent>
    @code
    {
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.ClipBounds = new DiagramRect() { X = 100, Y = 0, Width = 500, Height = 600 };
       }

    FitToPage

    Gets or sets the value to indicate whether to print or export the entire diagram to single page or multiple pages.

    Declaration
    public bool FitToPage { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the diagram printed or exported to single page. Otherwise, diagram printed or exported into multiple pages or images. The default value is false.

    Examples
    <SfDiagramComponent>
    <PageSettings />
    </SfDiagramComponent>
    @code
    {
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.FitToPage = true;
       }

    Margin

    Gets or sets the margin of the page to be printed/exported.

    Declaration
    public DiagramThickness Margin { get; set; }
    Property Value
    Type Description
    DiagramThickness

    Space around the content to be printed/exported.The default value for margin is 25 for all sides.

    Examples
     <SfDiagramComponent>
    <PageSettings />
    </SfDiagramComponent>
    @code
    {
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.Margin = new DiagramThickness() { Left = 10, Top = 10, Right = 10, Bottom = 10 };
       }

    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.

    Examples
    <SfDiagramComponent>
    <PageSettings  Orientation="@pageOrientation"/>
    </SfDiagramComponent>
    @code
    {
        PageOrientation pageOrientation = PageOrientation.Landscape;
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.Orientation = orientation;
       }

    PageHeight

    Gets or sets the height of the page to be printed.

    Declaration
    public double PageHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The height of the page to be printed. The default value will be Height.

    Examples
     <SfDiagramComponent>
    <PageSettings  Height="@PageHeight" 
    </SfDiagramComponent>
    @code
    {
        double PageHeight = 300;
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         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.

    Examples
     <SfDiagramComponent>
    <PageSettings Width = "@PageWidth" />
    </SfDiagramComponent>
    @code
    {
        double PageWidth = 300;
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.PageWidth = PageWidth;
       }

    Region

    Gets or sets the region in the diagram which need to be printed or exported.

    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 printed or exported.
    • Content – Content of the diagram without empty space around the content is printed or exported.
    • ClipBounds - The region specified using ClipBounds property is exported. This is applicable for exporting only.
    Examples
    <SfDiagramComponent>
    <PageSettings />
    </SfDiagramComponent>
    @code
    {
       private async Task<string[]> OnExportEntry()
       {
         DiagramExportSettings print = new DiagramExportSettings();
         print.Region = DiagramPrintExportRegion.PageSettings;
       }

    Implements

    IDiagramPrintExportSettings
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved