Printing to a Network Printer
PDF documents can be printed to Network printers by adding a printer to the system where the application is running or by using an UNC path of the shared network printer.
Using Installed Network Printer
To install a network printer to the system where the application is running, use the printer name when creating the PrintJob object as the following example illustrates.
PrintJob printJob = new PrintJob("networkPrinterName");
Dim printJob As PrintJob = New PrintJob("networkPrinterName")
Refer to Microsoft help for more information on installing/adding printers.
Using UNC Path
Access a network printer using the UNC path.
PrintJob printJob = new PrintJob("\\IPAddress\PrinterShareName");
Dim printJob As PrintJob = New PrintJob("\\IPAddress\PrinterShareName")
Note the following when using this approach to accessing a network printer.
- The printer driver will be installed automatically in the background if not already installed.
- The user context the application is running under needs permission to install printer drivers on the server.
- The workstation will need to have the driver for the appropriate platform(x86/x64) of the server. If the workstation is x86, it will need to have the x64 driver available if the server is x64.
- The user context the application is running under also needs permission to print to the printer.