PrintingSystemCommand Enum
Specifies the commands which can be executed in the printing system’s document preview.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Data.v24.2.dll
NuGet Package: DevExpress.Data
#Declaration
#Members
Name | Description |
---|---|
None
|
Doesn’t identify any command. This member is intended for internal use only. |
Document
|
|
Parameters
|
|
Pointer
|
Shows the mouse pointer, when there is no need to show either the Hand Tool, or the Magnifier. Note that this command is in use in the Ribbon Print Preview Form only. |
Hand
|
|
Customize
|
|
Print
|
|
Print
|
|
Page
|
|
Edit
|
|
Magnifier
|
|
Zoom
|
|
Zoom
|
|
Zoom
|
|
Zoom
|
Identifies the Zoom trackbar control, which is available in the bottom-right corner of the Print Preview Form with a Ribbon. |
View
|
Zooms a document in or out so that only one entire page of the document is shown in the preview. |
Show
|
|
Show
|
|
Show
|
|
Scroll
|
Scrolls one page up, as when an end-user presses the PAGE UP key. |
Scroll
|
Scrolls one page down, as when an end-user presses the PAGE DOWN key. |
Show
|
|
Multiple
|
|
Fill
|
|
Find
|
|
Close
|
|
Watermark
|
|
Export
|
|
Send
|
|
Export
|
Exports the current document to a graphics file (BMP, EMF, GIF, JPEG, PNG, TIFF, WMF formats). |
Export
|
Exports the current document to a PDF file. |
Export
|
Exports the current document to a TXT file. |
Export
|
Exports a document to a CSV (comma-separated values) file. |
Export
|
Exports the current document to an MHT file. |
Export
|
Exports the current document to an XLS file. |
Export
|
Exports the current document to an XLSX file. |
Export
|
Exports the current document to an RTF file. |
Export
|
Exports the current document to a DOCX file. |
Export
|
Exports the current document to an HTML file. |
Export
|
Exports the current document to an XPS file. Note This is supported only by the DXPrinting for WPF library. |
Send
|
Exports the current document to a graphics file (BMP, EMF, GIF, JPEG, PNG, TIFF, WMF formats) and sends it via e-mail. |
Send
|
Exports the current document to a PDF file and sends it via e-mail. |
Send
|
Exports the current document to a TXT file and sends it via e-mail. |
Send
|
Exports the current document to a CSV (comma-separated values) file and sends it via e-mail. |
Send
|
Exports the current document to an MHT file and sends it via e-mail. |
Send
|
Exports the current document to an XLS file and sends it via e-mail. |
Send
|
Exports the current document to an XLSX file and sends it via e-mail. |
Send
|
Exports the current document to an RTF file and sends it via e-mail. |
Send
|
Exports the current document to a DOCX file and sends it via e-mail. |
Send
|
Exports the current document to a XPS file and sends it via e-mail. Note This is supported only by the DXPrinting for WPF library. |
Zoom
|
Zooms a document in or out as appropriate, so that the width of the current page fits the preview window. |
Zoom
|
Zooms a document in or out as appropriate, so that the width of the text in the current page fits the preview window. |
Zoom
|
Zooms a document in or out as appropriate, so that only a single page of the document is shown in the preview. |
Zoom
|
Zooms a document in or out as appropriate, so that only two entire pages of the document are shown in the preview. |
Page
|
Identifies the item which is the parent to the Page |
Page
|
Changes the view of the document’s preview so that the pages are arranged side-by-side. |
Page
|
Changes the view of the document’s preview so that the pages are arranged as a continuous vertical column. |
File
|
Identifies the File menu item, which is a parent for the Page |
View
|
Identifies the View menu item, which is a parent for the Page |
Background
|
Identifies the Background menu item, which is a parent for the Fill |
Scale
|
|
Paper
|
Chooses the paper size of the document. Note that this command is in use in the Ribbon Print Preview Form only. |
Page
|
Switches the pages between portrait and landscape layouts. Note that this command is in use in the Ribbon Print Preview Form only. |
Page
|
Selects the margin sizes for the entire document. Note that this command is in use in the Ribbon Print Preview Form only. |
Open
|
|
Save
|
|
Stop
|
Identifies the Stop button, which is displayed in the status bar to the right of the progress bar, and can be used to stop generating a document. |
Submit
|
Submits the parameters specified in the Parameters panel. |
Copy
|
Copies the selected document content to the Clipboard. |
Print
|
Prints the selected document content. |
Go
|
Raises the Go To Page dialog to jump to the specified page number. |
Thumbnails
|
Toggles the Thumbnails panel visibility. |
Highlight
|
Highlights all available fields whose content can be edited. |
#Related API Members
The following properties accept/return PrintingSystemCommand values:
Library | Related API Members |
---|---|
Cross-Platform Class Library | Print |
Print |
|
XAF: Cross-Platform .NET App UI & Web API | Custom |
#Remarks
Every printing system command represents either a toolbar button, a menu item, or both a button and a corresponding menu item in the Preview window. This enumeration’s members are used to specify the printing system commands, and can be used with the PrintingSystemBase.SetCommandVisibility, PrintingSystemBase.GetCommandVisibility and PrintControl.ExecCommand methods.
#Example
This example illustrates how to change the visibility of the toolbar buttons and menu items of a print preview by using the PrintingSystemBase.SetCommandVisibility method that defines the availability of commands in print preview.
The following code hides the Watermark button from the toolbar (together with the corresponding menu item), makes the DocumentMap button and menu item visible, and then makes the ExportToCsv and ExportToTxt commands visible (in both the window’s menu, and in the toolbar).
All available commands are listed in the PrintingSystemCommand
enumeration.
using DevExpress.XtraPrinting;
// ...
// Get the printing system of the DocumentViewer control.
PrintingSystemBase ps = documentViewer1.PrintingSystem;
// Hide the Watermark toolbar button, and also the Watermark menu item.
if (ps.GetCommandVisibility(PrintingSystemCommand.Watermark) != CommandVisibility.None){
ps.SetCommandVisibility(PrintingSystemCommand.Watermark, CommandVisibility.None);
}
// Show the Document Map toolbar button and menu item.
ps.SetCommandVisibility(PrintingSystemCommand.DocumentMap, CommandVisibility.All);
// Make the "Export to Csv" and "Export to Txt" commands visible.
ps.SetCommandVisibility(new PrintingSystemCommand[]
{PrintingSystemCommand.ExportCsv, PrintingSystemCommand.ExportTxt}, CommandVisibility.All);