C1PrintDocument allows to you to specify different printing options and page settings for your document. The page settings can be specified in the designer or in code.
You can also change your page settings for your C1PrintDocument at run time, by adding the following code to the Form_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1PrintDocument1.PageLayout.PageSettings.Landscape = True |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1PrintDocument1.PageLayout.PageSettings.Landscape = true; |
You can also change the page settings for your C1PrintDocument in the preview at run time using the Page Setup dialog box.
Click the Page Setup button located in the toolbar.
The Page Setup dialog box opens.
The Page Setup dialog box contains the following fields:
Field Name | Description |
---|---|
Paper | Select the size and the source of the paper. The available sizes and sources depend on the selected printer. |
Orientation | Choose from Portrait or Landscape page orientation. |
Margins | Customize the Left, Right, Top, and Bottom margins of your C1PrintDocument. |
The Page Setup dialog box has the following Command Buttons:
Button Name | Description |
---|---|
OK | Apply the settings to your C1PrintDocument. |
Cancel | Cancel the modified Page Settings for your document. |
Printer | Modify or view the settings for your printer. |
Locate the Orientation field and select the Landscape option. Your C1PrintDocument now appears and will print in the Landscape orientation.