Back to Devexpress

SpreadsheetCompatibilityOptions.EnableLegacyPrintLayout Property

officefileapi-devexpress-dot-xtraspreadsheet-dot-spreadsheetcompatibilityoptions-daf54a84.md

latest3.1 KB
Original Source

SpreadsheetCompatibilityOptions.EnableLegacyPrintLayout Property

Allows you to use the legacy mechanism to generate a document printout.

Namespace : DevExpress.XtraSpreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[DefaultValue(false)]
public bool EnableLegacyPrintLayout { get; set; }
vb
<DefaultValue(False)>
Public Property EnableLegacyPrintLayout As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true to disable enhanced printout generation; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to EnableLegacyPrintLayout
DocumentOptions

.Compatibility .EnableLegacyPrintLayout

|

Remarks

In v20.1 and v20.2, we improved row height and column width calculation for printed workbooks in our WinForms Spreadsheet control and Spreadsheet Document API. The resulting printout now resembles the print output of Microsoft® Excel®.

This option is only available when you use the new layout calculation engine (the EnableLegacyLayoutEngine property is false ).

If you upgrade your application to DevExpress v20.1 or later, a printed document’s layout can change. You can activate the EnableLegacyPrintLayout property to revert to the legacy algorithm.

Disable print layout enhancements for a Workbook instance:

csharp
workbook.Options.Compatibility.EnableLegacyPrintLayout = true;
vb
workbook.Options.Compatibility.EnableLegacyPrintLayout = True

Disable print layout enhancements for the Spreadsheet control:

csharp
spreadsheetControl.Options.Compatibility.EnableLegacyPrintLayout = true;
vb
spreadsheetControl.Options.Compatibility.EnableLegacyPrintLayout = True

See Also

SpreadsheetCompatibilityOptions Class

SpreadsheetCompatibilityOptions Members

DevExpress.XtraSpreadsheet Namespace