Posted on 04-03-2023 07:03 AM
Good day all,
I am working on a project currently to automate the creation of a build sheet that will print when the Mac has been enrolled and all software installed. I am able to successfully create the buildsheet as an HTML file and open it in Safari successfully. The issue I have run into is automatically printing the page to the default printer. Does anyone know how to have Safari print the current open tab automatically in Apple Script? I tried finding resources for this online but I could not find much that was helpful in my situation. Any help would be greatly appreciated.
Posted on 04-03-2023 07:24 AM
not exactly what you asked for.. but this may work.. make a PDF of the HTML and push that via:
lpr -P printername filename.pdf
Posted on 04-03-2023 07:52 AM
Thanks for this idea. I looked into it briefly and found a script online for exporting the tab as PDF. The issue I find is that in PDF form the margins of my table are all wonky. I'll keep this as a last resort, maybe I can adjust my html to display properly.
Posted on 04-03-2023 07:58 AM
suggested PDF so its more formatted, but try sending the raw HTML.. see what comes out..