Printing to a Network Printer
Print PDF documents to network printers by adding a printer to the system where the application is running or by using a UNC path of the shared network printer.
Using Installed Network Printer
Use the printer name when creating a PrintJob object to install a network printer to the application's system, 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")
Accessing A Network Printer
When accessing a network printer, be sure you have correctly installed drivers and have the necessary permissions.
Note: you must have correct drivers and proper permissions.
- A printer driver is automatically installed in the background if not already installed.
- The user context the application is running under must have permission to install printer drivers on the server.
- The workstation must have the server's driver for the appropriate platform(x86/x64). If the workstation is x86, it requires the x86 driver. If the server is x64, then it needs the x64 driver.
- The application's user context requires permission to print to the printer.