Step 3 — Customize Print Preview Page Settings
- 3 minutes to read
This topic contains an overview of print page customization options.
Tip
The core print-related APIs are designed for simple document generation scenarios and print/content export operations available for the majority of DevExpress VCL Controls (shipped as part of ExpressQuantum Pack, VCL Subscription, and VCL Subscription+).
For most advanced report generation and BI/data analytics usage scenarios, we recommend that you use our ExpressReports and ExpressDashboards Suites (available as part of the VCL Subscription +). These advanced solutions include both the powerful report generator and customizable print preview, BI dashboard designer and viewer for data analytics (available both at design- and runtime), smart/AI functions, non-GUI/service-based document generation, and much more.
Customize Page Margins
Display a collection editor for the TdxComponentPrinter component and click the Page Setup… button to display the corresponding dialog.

Switch to the Margins tab and drag the left margin to the right to increase it.

Horizontally and Vertically check boxes allow you to center printed content within the page.
Modify Header & Footer Settings
Switch to the Header/Footer tab to define and customize page header and footer content. For example, you can use reserved character sequences to display corresponding information in the resulting document, such as the current time, page number, etc. Click buttons within the Predefined Functions pane to add the required placeholders. In addition, you can complement placeholders with static text.

Click the Background button within the Header pane to select a fill color or effect.

Click the OK button to close the dialog and apply pending changes.

Configure Page Background Settings
Click the ellipsis button for the print link’s PrintedPage.Background property in the Object Inspector to display the Fill Effects dialog. Select the White Marble texture and click the OK button to apply the change.

Run the application and click the Print the ListBox button to display the Print Preview dialog. Page appearance changes according to the modified settings.

Display Print Configuration Dialogs at Runtime
To display Page Setup and Fill Effects dialogs at runtime, you can add two buttons and handle their OnClick events as follows:
uses
dxPSCore, // Declares the TdxComponentPrinter component and related types
dxPSLbxLnk, // Declares the TdxListBoxReportLink component
cxButtons; // Declares the TcxButton component
// ...
procedure TMyForm.cxPageSetupButtonClick(Sender: TObject);
begin
dxListBoxReportLink1.PageSetup; // Displays the "Page Setup" dialog
end;
procedure TMyForm.cxFillEffectsButtonClick(Sender: TObject);
begin
dxListBoxReportLink1.PrinterPage.Background.SetupEffects; // Displays the "Fill Effects" dialog
end;
Run & Test the App
Run the test app and click the created buttons to display corresponding dialogs.

Tip
Users can display these dialogs using Page Setup and Background toolbar buttons within the Print Preview dialog (or using File | Page Setup… and Format | Background… menu items).
Next Step
The next step generates one document using multiple different controls as sources simultaneously.