Back to Devexpress

LinkBase.CustomPaperSize Property

corelibraries-devexpress-dot-xtraprinting-dot-linkbase-45c22ef2.md

latest4.8 KB
Original Source

LinkBase.CustomPaperSize Property

Gets or sets the paper size (measured in hundredths of an inch).

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[Browsable(false)]
public Size CustomPaperSize { get; set; }
vb
<Browsable(False)>
Public Property CustomPaperSize As Size

Property Value

TypeDescription
Size

A Size value that specifies the custom paper size (measured in hundredths of an inch).

|

Remarks

To specify a custom paper size for a printing link, do the following:

Note that the paper size should be larger than the page margins.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomPaperSize property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-print-and-export-visual-representation-as-is/CS/DashboardExport/CustomDashboardExporter.cs#L24

csharp
componentLink.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom;
componentLink.CustomPaperSize =
    new Size(Convert.ToInt32(Math.Ceiling(viewer.Width / 0.96f)) + 45,

reporting-winforms-merge-reports-runtime/CS/reportMerging/Form1.cs#L39

csharp
link.PaperKind = DXPaperKind.Custom;
link.CustomPaperSize = new Size(width, height);
link.Margins = new DXMargins(reports.First<XtraReport>().Margins.Left, reports.First<XtraReport>().Margins.Right, reports.First<XtraReport>().Margins.Top, reports.Last<XtraReport>().Margins.Bottom);

winforms-dashboard-print-and-export-visual-representation-as-is/VB/DashboardExport/CustomDashboardExporter.vb#L26

vb
componentLink.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom
componentLink.CustomPaperSize = New Size(Convert.ToInt32(Math.Ceiling(viewer.Width / 0.96F)) + 45, Convert.ToInt32(Math.Ceiling(viewer.Height / 0.96F)) + 45)
ps.PreviewFormEx.Size = New Size(viewer.Width + 100, viewer.Height + 100)

reporting-winforms-merge-reports-runtime/VB/reportMerging/Form1.vb#L48

vb
Me.link.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.Custom
Me.link.CustomPaperSize = New System.Drawing.Size(width, height)
Me.link.Margins = New DevExpress.Drawing.DXMargins(System.Linq.Enumerable.First(Of DevExpress.XtraReports.UI.XtraReport)(reports).Margins.Left, System.Linq.Enumerable.First(Of DevExpress.XtraReports.UI.XtraReport)(reports).Margins.Right, System.Linq.Enumerable.First(Of DevExpress.XtraReports.UI.XtraReport)(reports).Margins.Top, System.Linq.Enumerable.Last(Of DevExpress.XtraReports.UI.XtraReport)(reports).Margins.Bottom)

See Also

PaperKind

PaperName

LinkBase Class

LinkBase Members

DevExpress.XtraPrinting Namespace