corelibraries-devexpress-dot-xtraprinting-dot-linkbase-45c22ef2.md
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
[Browsable(false)]
public Size CustomPaperSize { get; set; }
<Browsable(False)>
Public Property CustomPaperSize As Size
| Type | Description |
|---|---|
| Size |
A Size value that specifies the custom paper size (measured in hundredths of an inch).
|
To specify a custom paper size for a printing link, do the following:
CustomPaperSize property to specify the custom paper size.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.
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
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);
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
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