%WPR_SETDEVICE
WSupported on Windows
|
|
|
NSupported in Synergy .NET
|
status = %WPR_SETDEVICE(report_handle, capability, setting)
Return value
status
Returns true if the printer supports the specified capability or false if the printer was not set to the requested setting. (n)
report_handle
The report handle returned by the DWP_GETPRINTER subfunction of %WPR_INFO. (n)
One of the following printer capabilities: (n)
DWP_ORIENTATION = Document orientation
DWP_PAPERSIZE = Paper size
DWP_PAPERLENGTH = Paper length
DWP_PAPERWIDTH = Paper width
DWP_SCALE = Scaling factor
DWP_COPIES = Number of copies
DWP_QUALITY = Print quality
DWP_COLOR = Color vs. monochrome
DWP_DUPLEX = Duplex mode
DWP_COLLATE = Collation
DWP_FORMNAME = Form to use
DWP_FONT = Font characteristics
DWP_TEXTCOLOR = Text color
DWP_BACKCOLOR = Background color
DWP_PAPERSOURCE = Paper source
DWP_SPECS = All printer capabilities
setting
The value to which you want to set the printer capability. (a or n)
Discussion
%WPR_SETDEVICE is similar to %WPR_GETDEVICE, except that each of the listed capabilities sets—rather than gets—the specified property. See %WPR_GETDEVICE for details on the capability options.
Although all printer capabilities are included in the print_specs structure passed by DWP_SPECS, only the following can be modified using %WPR_SETDEVICE: orientation, paper_size, paper_length, paper_width, scale, copies, quality, color, duplex, collate, formname, and paper_source. Any settings that you change must be supported by your printer driver.
Custom paper sizes
If your printer driver allows you to select custom paper sizes, you can do so as follows:
1. | Use %WPR_GETDEVICE to get the DWP_SPECS for the device. |
2. | Clear the paper_size member of the returned structure. |
3. | Set the paper_length and paper_width members to the size of the desired custom form. (The specified paper length and paper width must match a supported paper size; you cannot make up your own paper dimensions unless your printer driver supports it.) |
4. | Use %WPR_SETDEVICE with DWP_SPECS using the modified structure. |