Can't find shared print server printer

Hello,

I have no problem getting the following script to work, except when the printer is installed from a print server. Does anyone know how to get ignition to recognize shared print server printers?

reportViewer = event.source.parent.getComponent('Report Viewer')
reportViewer.print("Label Printer", 0)

Note that it does not work if I have ignition look for "Label Printer on 192.168.0.11" as the printer name either.

I had a similar problem, sort of. Make sure the printer you want to print to is setup as a printer on the gateway host computer, not the client computer. I had to manually add the printer to the gateway using the windows ‘add printer.’ Searching for the printer and selecting it didn’t work in my situation, I manually added the printer and ip address for it to work. Not sure if this helps at all. good luck

How would I point the script at that printer? I think by default in my situation it’s just looking at the local machine’s installed printers. Doing “\\192.168.0.11\Label Printer” doesn’t work.

I’m no expert on this matter, but you should go to your computer that hosts the gateway, and install the printer there using the setup wizard. Then you should be able to reference the printer by name as before. The ip address would come in while using the setup wizard.

  1. You install the printer on the gateway.
  2. You have to restart the gateway after adding a new printer since Java doesn’t constantly poll the machine for printers.
  3. Reference the printer by name in the script. In your picture it would be ‘Label Printer’

I figured out that by leaving reportViewer.print() blank, ignition will prompt you with the printer configuration dialog box, where you can see exactly what the print-server printer is named locally. Then I just take that name and add it in like reportViewer.print(r"\DLFDC01.dnl.local\Label Printer",0), everything works as intended.

Thank you to everyone who replied!

2 Likes