To follow up on @leo_r’s suggestion…
There are a couple of commands that allow you to print stuff as well as specify a printer… specifically ‘lp
’ or 'lpr'
to print files, and ‘lpstat
’ and ‘lpoptions
’ to gather information and manage things. You can see what printers are available with ‘lpstat’.
For example, in the Terminal, you can type this to see the printers that are available and enabled and which is the default:
lpstat -p -d
You should then be able to print a pdf with a command like this. Note, I’m guessing at what the name of the envy printer is but the above command should provide the proper string. I think that it is case insensitive.
lp -d hp_envy_photo_7800_series filename.pdf
An applescript command to run this might be:
do shell script "lp -d hp_envy_photo_7800_series filename.pdf"
Note that your printer probably knows how to print pdf files without being open in an application. I’m not sure whether this will work with a word document. So, assuming that this can be made to work, it might be worth saving your test document as a pdf.
Also, there are several posts and threads on this site that discuss how to make some of these commands work. If you search the site for lpstat
or lpoptions
, you can browse through them.
The key thing though is to see whether you can work with your printers via the command line. Try launching Terminal (inside /Applications/Utilities) and typing lpstat -p -d
and then ‘return’.
Hopefully, you’ll get a result like this but without the ‘paused’ — I don’t do a lot of printing
% lpstat -d -p
system default destination: Brother_HL_2270DW_series
printer Brother_HL_2270DW_series disabled since Thu 18 Mar 13:33:17 2021 -
Paused
Then let us know what the result is and maybe we can walk you through this.