3

I am creating an invoice tool within Google Sheets. The way it works is that after all the data is entered, a script is running, creating a sheet with the actual layed-out invoice.

I know that there is a way to automatically export sheets as PDF (by calling the document url with the "export?exportFormat=pdf" argument). But I don't want to export directly, I just need the "Print" dialog (File->Print) to pop up automatically so the user can adjust the settings before printing. (I know, it's not a big deal to press cmd+P yourself, but having the dialog open automatically would streamline the whole process a bit).

Is there any way to do that? I haven't found anything helpful within the documentation.

Markus
  • 31
  • 2
  • Unlikely that Apps Script can call on browser-specific details. Perhaps if you're using a sidebar in your design, you could use client side JavaScript to achieve this (since that html is actually running in the user's browser, and not Google's servers – tehhowch Aug 24 '18 at 13:04

1 Answers1

1

There isn't a way to do that with Google Apps Script services but you might do that by using client side code.

Related

Rubén
  • 34,714
  • 9
  • 70
  • 166