Inesoft
PrintCE SDK EVC++ |
Allows to set up printing without a printing dialog
C++ Syntax: long ret = object.SilentSetup(
long parent,
long printer,
long port,
long paper,
long paper_width,
long paper_height,
long color_mode,
long portrait,
long draft_mode,
long left_margin,
long top_margin,
long right_margin,
long bottom_margin
);
eVB Syntax: ret = object.SilentSetup(
parent,
printer,
port,
paper,
paper_width,
paper_height,
color_mode,
portrait,
draft_mode,
left_margin,
top_margin,
right_margin,
bottom_margin
)Parameters
parent
Handle to the parent window. In case of incorrect parameters in info, driver uses this handle as a parent for message presentions.
printer
Selected printer.
0 - "HP PCL 3 "
1 - "Epson ESC/P 2"
2 - "Epson Stylus COLOR"
3 - "PocketJet II"
4 - "PocketJet 200"
5 - "Canon BJ (300 dpi)"
6 - "Canon BJ (360 dpi)")
7 - "C-POS/Amtech Mobile"
8 - "Epson LX (9-pin)"
9 - "Adobe PDF file"
10 - "MTE Porti-W40"
11 - "Canon IP90"
12 - "Partner M1POS"
13 - "SP-T8"
14 - "Canon IP100"
15 - "Zebra"
16 - "MP-300"
17 - "O'Neil 4 inch"
18 - "O'Neil 3 inch"
19 - "HP PCL 5e"
20 - "Intermec PB42/50/51"
21 - "Intermec PB2/3"
22 - "Datamax Apex"
23 - "HP PCL3GUI"
24 - "Star SM-S200/300/400"
port
Selected port:
0 - "Infrared"
1 - "COM1"
2 - "COM2"
3 - "COM3"
4 - "COM4"
5 - "COM5"
6 - "COM6"
7 - "COM7"
8 - "COM8"
9 - "File"
10 - "Network printer"
11 - "COM9"
12 - "COM10"
13 - "COM11"
14 - "COM12"
15 - "Bluetooth Broadcom"
16 - "Bluetooth Microsoft"
17 - "LPT1"
18 - "USB" (to print over USB usbprn.dll must be present into "\Windows" folder)
19 - "LPT2"
paper
Paper size.
For "HP PCL 3 ", "HP PCL 5e", "HP PCL3GUI", "Epson ESC/P 2", "Epson Stylus COLOR", "Epson LX (9-pin)", "Canon BJ (300 dpi)", "Canon BJ (360 dpi)", "Canon IP90", "Canon IP100" printers:
0 - "A4"
1 - "A5"
2 - "B5"
3 - "Letter"
4 - "Legal"
5 - "Executive"
6 - "Custom"
For "Adobe PDF file":
0 - "A4"
1 - "A3"
2 - "A5"
3 - "B5"
4 - "Letter"
5 - "Legal"
6 - "Executive"
7 - "Custom"
For "PocketJet II" and "PocketJet 200" printers:
0 - "A4"
1 - "Letter"
2 - "Legal"
3 - "Custom"
For "Amtech", "MTE W40", "Partner M1POS", "SP-T8", "MP-300", "O'Neil 4 inch", "O'Neil 3 inch" printer:
0 - "Roll paper"
1 - "Custom"
For "Zebra":
0 - "MZ220,QL220" (1.9" - 48mm)
1 - "EM220,RW220" (2.2" - 56mm)
2 - "MZ320,QL320+" (2.9" - 74mm)
3 - "RW420,QL420+" (4" - 101mm)
4 - "Custom"
For "Intermec PB42/50/51":
0 - "4 inch Roll paper"
1 - "Custom"
2 - "2 inch Roll paper"
3 - "3 inch Roll paper"
For "Intermec PB2/3":
0 - "2 inch Roll paper"
1 - "3 inch Roll paper"
2 - "4 inch Roll paper"
3 - "Custom"
For "Datamax Apex":
0 - "2 inch Roll paper"
1 - "3 inch Roll paper"
2 - "4 inch Roll paper"
3 - "Custom"
"Star SM-S200/300/400"
0 - "2 inch Roll paper"
1 - "3 inch Roll paper"
2 - "4 inch Roll paper"
3 - "Custom"
paper_width
Sets the paper width in hundredth of millimeters
paper_height
Sets the paper height in hundredth of millimeters
color_mode
Color printing mode:
0 - Monochrome (B&W)
1 - 4 Color CMYK
2 - 3 Color CMY
portrait
Paper orientation:
TRUE - portrait
FALSE - landscape
draft_mode
Draft mode:
TRUE - draft mode on
FALSe - draft mode off
left_margin
Sets the left margin of the printed page in the current measurement units
top_margin
Sets the top margin of the printed page in the current measurement units
right_margin
Sets the right margin of the printed page in the current measurement units
bottom_margin
Sets the bottom margin of the printed page in the current measurement units
Note:
It is possible to set specific port settings with registry.
For "File" port: set output file path (registry "HKEY_CURRENT_USER\Software\Inesoft\PrintCE" string value "FilePath")
For "Network printer" port: set network printer path (registry "HKEY_CURRENT_USER\Software\Inesoft\PrintCE\NetPrinters" string value "SelPath")
For "Bluetooth Broadcom" port: registry "HKEY_CURRENT_USER\Software\Inesoft\PrintCE\Bluetooth(Broadcom)" values:
"Address" - address of Bluetooth device as binary value (see "Widcomm Bluetooth SDK documentation for details)
"Service" - service name as string (see "Widcomm Bluetooth SDK documentation for details)
"Channel" - sevice channel number as DWORD (see "Widcomm Bluetooth SDK documentation for details)
For "Bluetooth Microsoft " port: registry "HKEY_CURRENT_USER\Software\Inesoft\PrintCE\Bluetooth(Microsoft)" binary value "Address - address of Bluetooth device
Return Values
Non zero value indicates success, 0 indicates failure
See Also