# Print an order

**URL:** <https://community.glideapps.com/t/print-an-order/8476>\
**Category:** Ask for Help\
**Created:** [May 5, 2020, 1:37am UTC](https://community.glideapps.com/t/print-an-order/8476 "2020-05-05T01:37:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 1:37am UTC](https://community.glideapps.com/t/print-an-order/8476/1 "2020-05-05T01:37:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 5, 2020, 2:23am UTC](https://community.glideapps.com/t/print-an-order/8476/2 "2020-05-05T02:23:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 4:36am UTC](https://community.glideapps.com/t/print-an-order/8476/3 "2020-05-05T04:36:37Z")

</div>

PC ou Laptop…

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 1:44pm UTC](https://community.glideapps.com/t/print-an-order/8476/4 "2020-05-05T13:44:28Z")

</div>

Mobile application also via bluetooth.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 5, 2020, 2:44pm UTC](https://community.glideapps.com/t/print-an-order/8476/5 "2020-05-05T14:44:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 4:07pm UTC](https://community.glideapps.com/t/print-an-order/8476/6 "2020-05-05T16:07:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 4:34pm UTC](https://community.glideapps.com/t/print-an-order/8476/7 "2020-05-05T16:34:31Z")

</div>

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?

 ![Recibo whatsapp](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e18915353e98388f95b589076c12e2b5a64a6b9f.jpeg)

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 5, 2020, 5:33pm UTC](https://community.glideapps.com/t/print-an-order/8476/8 "2020-05-05T17:33:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [May 5, 2020, 6:22pm UTC](https://community.glideapps.com/t/print-an-order/8476/9 "2020-05-05T18:22:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 5, 2020, 10:03pm UTC](https://community.glideapps.com/t/print-an-order/8476/10 "2020-05-05T22:03:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gerard\_Fernandez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gerard_fernandez/32/1183_2.png) [@Gerard\_Fernandez](https://community.glideapps.com/u/Gerard_Fernandez)\
**Post date:** [May 16, 2020, 5:28am UTC](https://community.glideapps.com/t/print-an-order/8476/11 "2020-05-16T05:28:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rohan\_Dayanand](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rohan_dayanand/32/1398_2.png) [@Rohan\_Dayanand](https://community.glideapps.com/u/Rohan_Dayanand)\
**Post date:** [May 16, 2020, 9:21am UTC](https://community.glideapps.com/t/print-an-order/8476/12 "2020-05-16T09:21:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 17, 2020, 9:33pm UTC](https://community.glideapps.com/t/print-an-order/8476/13 "2020-05-17T21:33:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 17, 2020, 9:35pm UTC](https://community.glideapps.com/t/print-an-order/8476/14 "2020-05-17T21:35:35Z")

</div>

```auto
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);
}
```

---

<div class="post-metadata">

**Author:** ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)\
**Post date:** [May 17, 2020, 9:38pm UTC](https://community.glideapps.com/t/print-an-order/8476/15 "2020-05-17T21:38:25Z")

</div>

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

> **[Automation](https://chrome.google.com/webstore/detail/automation/jldomlpgobfdlloikpngnjbdidonfjhj)**
>
> Create automated scenarios.

---

<div class="post-metadata">

**Author:** ![Gerard\_Fernandez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gerard_fernandez/32/1183_2.png) [@Gerard\_Fernandez](https://community.glideapps.com/u/Gerard_Fernandez)\
**Post date:** [May 18, 2020, 6:43am UTC](https://community.glideapps.com/t/print-an-order/8476/16 "2020-05-18T06:43:48Z")

</div>

Thanks! Trying it

---

<div class="post-metadata">

**Author:** ![Gerard\_Fernandez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gerard_fernandez/32/1183_2.png) [@Gerard\_Fernandez](https://community.glideapps.com/u/Gerard_Fernandez)\
**Post date:** [May 18, 2020, 7:23am UTC](https://community.glideapps.com/t/print-an-order/8476/17 "2020-05-18T07:23:57Z")

</div>

> [@Drearystate](#):
>
> ```auto
> 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);
> }
> 
> ```

This error appears

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/0cda7b9f263bde00d8cb4605ced1a0c09675b8f1.png)

UiApp no longer availabe use instead HtmlService

Thanks for your help !!

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [June 5, 2020, 9:30pm UTC](https://community.glideapps.com/t/print-an-order/8476/18 "2020-06-05T21:30:58Z")

</div>

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

> **[Integration: Glide-Apps to Google-Cloud-Print (How to connect apps)](https://zapier.com/apps/glide-apps/integrations/google-cloud-print)**
>
> Set up the Glide trigger, and make magic happen automatically in Google Cloud Print. Zapier's automation tools make it easy to connect Glide and Google Cloud Print. Come try it. It's free.

---

<div class="post-metadata">

**Author:** ![Lisa](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Lisa](https://community.glideapps.com/u/Lisa)\
**Post date:** [June 6, 2020, 2:40am UTC](https://community.glideapps.com/t/print-an-order/8476/19 "2020-06-06T02:40:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Valdir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/valdir/32/37658_2.png) [@Valdir](https://community.glideapps.com/u/Valdir)\
**Post date:** [June 6, 2020, 4:05pm UTC](https://community.glideapps.com/t/print-an-order/8476/20 "2020-06-06T16:05:03Z")

</div>

Thanks @Lisa…  
Waiting anxiously!!!

Valdir

[Next page](https://community.glideapps.com/t/print-an-order/8476.md?page=2)
