Print an order

Good evening!
Is it possible to use a thermal printer to print orders on Glide?
Thank you!
Valdir

2 Likes

You could do this a few different ways. My question would be is the thermal printer linked to a pc or laptop or are you wanting it to work directly from the mobile device only?

PC ou Laptop…

Mobile application also via bluetooth.

ok, if you have your device synced to the printer ia bluetooth and your device is capable of printing to bluetooth then yes. Setup a sheet tab that will pull the data that needs to be printed and set it up in the format that it needs to be printed. On that same sheet tab have a cell that is blank but has a label, now when you setup the sheet you will need to go into tools, then scripts and add a onEdit script that just runs the print function. You will need to have the pprinter selected in google sheets as the default printer. Now in your app you either need to make a button or a form that submits any data to that cell whether it be a number or a string. When the sheet is edited it will trigger the print function and you are done :).
I’m sure there are a few other ways of doing this but this was the first that came to mind.

1 Like

Initially @Drearystate thank you very much for the answer!
Was there a visible button on the Glide app for this? If so, how?
Tks!

Valdir

Complementing my need I would like to generate a receipt like the one I attached on whatsapp and be able to print. This receipt I copied from a group.
One of the focuses of my need. In short: How do I generate a receipt like this and print it?

So what you will do is replicate this setup on that separate google sheet tab. You will use a vlookup formula to populate the receipt with the data you need from your other sheet. As far as how the receipt is generated you can do this a dozen different ways. I think making a template and having it lookup the data you entered on a separate sheet would be the easiest. So have a button that edits the blank spot on the template and it would be a choice menu where its a drop down list of the reciepts already made, when you submit it it will edit the template which in turn will lookup the correct reciet which since it is edited it will trigger the function.

1 Like

Do we have a tutorial where you learn how to do this? Excuse. I’m starting at Glide.

No, I just made this up as you asked. I have about 15 years of teaching Excel and it kind of rolls into google sheets and glide. It will work, I was just browsing questions and I try to answer questions no one gets around to or doesn’t have a solution for. If you send me links to the app and the sheet I could probably set it up for you. You will still have to setup the printer to connect to your phone as well as the google sheet to default to that printer.

1 Like

Is it possible to run a script function that prints a sheet? How? Have not found info Googleing

Hey @Drearystate , very generous of you, thank you.

I have a printing question I hope you may be able to answer - a client of our has a thermal printer at this cafe with no bluetooth capabilities but it is connected to the wifi router.

We’re currently assessing ways to integrate with their POS which is already connected with the printer.

But a simpler process would be to directly connect to that same thermal printer and auto print when an order comes in? Is this possible without too much effort?

Glide has no way of connecting to it and you may be able to connect to it via the wifi. If you can connect directly to it via the wifi and the device using the mobile app you can do the same thing as above but just with that connection.

function printPdf() {
    SpreadsheetApp.flush();
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getActiveSheet();
    var gid = sheet.getSheetId();
    var pdfOpts = '&size=A3&fzr=true&portrait=false&fitw=true&gridlines=false&printtitle=true&sheetnames=true&pagenumbers=true&attachment=false&gid='+gid;
    var url = ss.getUrl().replace(/edit$/, '') + 'export?format=pdf' + pdfOpts
    var app = UiApp.createApplication().setWidth(300).setHeight(100);
    app.setTitle('Your Print Preview is Ready');
    var link = app.createAnchor('Open Print Preview', url).setTarget('_new');
    app.add(link);
    ss.show(app);
}
3 Likes

There is a google extension called Automation that can print for you though.

1 Like

Thanks! Trying it

This error appears

image

UiApp no longer availabe use instead HtmlService

Thanks for your help !!

How can I implement the link below to be able to print an order in a Glide application?

1 Like

Hi @Valdir I am also working on this feature for an app. I plan on working on this through the weekend. I’ll reach out to you if/when I find a solution.

3 Likes

Thanks @Lisa
Waiting anxiously!!!

Valdir