A
A
aminodovborisov2021-01-13 11:34:16
Google Apps Script
aminodovborisov, 2021-01-13 11:34:16

How to automatically print from Google Sheets without Google Cloud Printer?

Hello.
I faced the task: to write a script that can organize the printing of a Google Sheet, and the user's participation in this should be minimal. In addition, the user must do all this from the phone.
How the beginning is implemented:

  1. A QR code has been made that contains a link to the script. The user scans this code with a mobile phone and follows the link (of course, the user is authorized).
  2. Depending on the e-mail with which the user is authorized, certain actions are performed in Google Sheet. Normal cell filling.
  3. And the result needs to be printed somehow.


Briefly speaking. We have a smartphone in our hands, in front of us is a printer with a sticker, on the sticker there is a QR code. We scan the QR code with the phone, follow the link, we get a printed sheet. Ideally, there should be no user interaction between clicking on the link and printing. Well, maybe one or two.
I do not want to involve Google Cloud Printer. First, I'm repelled by dancing with a tambourine to receive OAuth2 data. Secondly, Google is threatening to stop supporting GCP.
So the idea is this.

  1. Export the desired sheet to PDF. Already implemented.
  2. PDF is saved on Google drive. Already implemented.
  3. We get a link to this PDF. Also implemented
  4. And then STOP.


With the fourth paragraph plugging.
I would like the PDF link to follow automatically. Is it possible? Maybe there is some functionality to automatically follow the link?
After opening the PDF file, the user only needs to send it for printing. And this is not difficult, since the printer is available via Wi-Fi.
Or are there other ways? I've tried giving a link (a href="obtained PDF link") as a result of the doGet() function. The link was followed from a computer, but not from a phone (iPhone). The phone browser did not react at all to the tap on the link.
Please share your experience.
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question