Print from Designated Printer Tray - Solution

I’m happy to report that after much angst I have a solution to calling different printers and trays from within Panorama X. I’ve had to update my sneaky methods multiple times over the years as Apple changes its printing scheme within the operating system.

My office has 2 printers with 3 trays each that handle different papers - letterhead, envelopes, claim forms, etc. I have had Pan 6 print from the correct tray and printer for nearly 25 years now, but was stymied by the change to Pan X on Ventura. Just this week after many tries I have something that works. Hoping my efforts can help others who need this, although I only use and test on my HP printers at home and work.

The basic plan involves installing the same printer multiple times and configuring each for the appropriate task. Once that is done, use a shellscript command to change the default printer each time Pan calls for printing from a specific tray. I always leave Plain Paper as the default for other apps to use.

  • Update firmware and drivers. I did not find the generic print drivers on the Mac give enough control for setting printing preferences. My HP M402dn at work and home are about 12 years old and find that Bonjour does a good job with them. In the past I always used IP protocol and entered the IP address on the network, but that doesn’t seem necessary at this point. My 24 year old HP 2100 is proving recalcitrant, but I haven’t put in the time yet to see if it has enough smarts to print this way.

  • Add the printer and give it a recognizable name, such as “Front Tray 1”

  • Add the same printer again and give it a different name, such as “Front Tray 2” or “Front Plain Paper Duplex”

  • Repeat as necessary

  • Take a simple document and print it on each printer in turn and set up a Print Job Preference with all the correct info for Tray, Duplex, Print Quality, etc. Have only one preference available and it will be the default whenever that printer instance is called.

  • Go into the Mac app Terminal and type in lpstat -p -d to get a list of available printers - this will give the exact name the lp command needs to use for each printer. Spaces will be replaced by the underscore character.

  • lpoptions -d sets the default printer. I always return to the Plain Paper tray after a change so that other Mac apps like Word will be ready to print on plain paper.

  • Set up printing in Pan like this (I actually call the shellscript command in a procedure called .Set Printer Tray 2 so that if the printer names change I only have to update it in one place):

    ShellScript |||lpoptions -d Front_HCFA_Forms |||
    SetWindowRectangle PageWind,“”
    openForm “Print HCFA 1500”
    PrintOneRecord Dialog
    ShellScript |||lpoptions -d Front_Plain_Paper |||

  • So far, so good. Seems to be working reliably but fingers crossed. Hope other printers and setups can make use of this scheme. One last new update: I used to have every print command figure out if I am at home or work, but have used this setup with the same names both places and now I can go back and forth without fuss.

1 Like