connection (PUT)
{server}/api/v1/printer/connection/{printerName}
Description
Allows printing to printers that are shared on the network but are not listed in the user's Printers and devices control panel by adding a connection to the specified printer for the current user.
The use of this method does not select the connected printer for printing.
This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation. Calling this function could make the ScriptX.Services Server appear to be unresponsive temporarily.
NOTE: Only use this function where a connection has already been made (and removed) before, in other words, where the required printer drivers are already available.
Applies to:
- ScriptX.Services for Windows PC 2.19 and later.
Request parameters
printerName (string, required)
- printerName (string, required)
-
Backslash characters in the network printer name may be custom encoded if required:
thePrinterName.replace(/\\/g, "||");
Response model
string
- String name of the current printer in the underlying print processor.