# Pdf creation with button

**URL:** https://community.glideapps.com/t/pdf-creation-with-button/35339
**Category:** Ask for Help
**Created:** [December 1, 2021, 9:40am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339 "2021-12-01T09:40:40Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Waser\_I\_Solutions](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/waser_i_solutions/32/34937_2.png) [@Waser\_I\_Solutions](https://community.glideapps.com/u/Waser_I_Solutions)
#### Post date: [December 1, 2021, 9:40am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/1 "2021-12-01T09:40:40Z")

</div>

Hello everyone, I would like to use a button to create a pdf, for this I have prepared a google doc with placeholders from the google table. as soon as the button is pressed, a pdf is to be created from a copy of the doc and sent to a folder on google drive and in a line in the google table so that it can be viewed in the glide app, how can i do that? I’m completely lost

 ![Bildschirmfoto 2021-12-01 um 10.36.18](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/5/e5c9038eb2262928ce640b9f891ba6249596ccec.png)

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 1, 2021, 9:50am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/2 "2021-12-01T09:50:15Z")

</div>

There is a thing called PDF Monkey which is quite popular for this sort of thing. I’ve never used it, but I’ve seen others recommend it. If you search around the forum, you should find plenty of threads about it.

Another way to create PDF’s is with Apps Script (this is what I do). But if you’re not comfortable with Apps Script, that may not be the best approach.

---

<div class="post-metadata">

### Author: ![Roldy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roldy/32/36068_2.png) [@Roldy](https://community.glideapps.com/u/Roldy)
#### Post date: [December 1, 2021, 9:54am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/3 "2021-12-01T09:54:28Z")

</div>

This can be an approach:

> [@How to generate a PDF in pdfmonkey.io via Zapier](https://community.glideapps.com/t/how-to-generate-a-pdf-in-pdfmonkey-io-via-zapier/27325):
>
> I want to premise that the method I am presenting here is currently the only one that I have tested and for which I am sure that it works. It is likely that there are better methods than mine; I think that through webhook it is possible to do better than this but I have not yet had the opportunity to experience it. In any case, if you want to know how to generate a PDF from your sheet which is the datasource of your Glide application, this tutorial will probably be useful for you. So let’s ge…

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [December 1, 2021, 1:14pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/4 "2021-12-01T13:14:36Z")

</div>

Here is the app script for that

> [@PDF Generation - Google Scripts help](https://community.glideapps.com/t/pdf-generation-google-scripts-help/22145/34):
>
> function emailSpreadsheetAsPDF() { DocumentApp.getActiveDocument(); DriveApp.getFiles(); // This is the link to my spreadsheet with the Form responses and the Invoice Template sheets // Add the link to your spreadsheet here // or you can just replace the text in the link between "d/" and "/edit" // In my case is the text: 17I8-QDce0Nug7amrZeYTB3IYbGCGxvUj-XMt8uUUyvI const ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/17I8-QDce0Nug7amrZeYTB3IYbGCGxvUj-XMt8…

---

<div class="post-metadata">

### Author: ![Darren\_Alderman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_alderman/32/66660_2.png) [@Darren\_Alderman](https://community.glideapps.com/u/Darren_Alderman)
#### Post date: [December 1, 2021, 1:54pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/5 "2021-12-01T13:54:37Z")

</div>

👆 👆 👆

@Waser_I_Solutions That script is a great example of how I typically set this up.

One thing to keep in mind is there will be a delay from when the document is generated to when it is visible in the app because you have to wait for the url to document to be added to your Google Sheet then wait for Glide to sync to the Google Sheet again and grab the URL.

---

<div class="post-metadata">

### Author: ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)
#### Post date: [December 1, 2021, 5:45pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/6 "2021-12-01T17:45:00Z")

</div>

Integromat is actually really easy to use for this too 🙂

---

<div class="post-metadata">

### Author: ![Jesus\_Valenzuela\_Dia](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jesus_valenzuela_dia/32/22582_2.png) [@Jesus\_Valenzuela\_Dia](https://community.glideapps.com/u/Jesus_Valenzuela_Dia)
#### Post date: [December 1, 2021, 6:45pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/7 "2021-12-01T18:45:12Z")

</div>

I use integromat to do it. Here is a video of the scenario, basically I created a template in google drive, then 1. Document is created from the template replacing the {{tags}} with the parameters values received in the webhook. 2. Once created, the .doc and .pdf links are pasted in a sheet (link columns) 3. Both documents (.doc and .pdf) are sent by email

> **[Export PDF scenario.mp4 (video)](https://drive.google.com/file/d/1iAY1YVqvry5_4R4IrOHA5yr9Bk7aj-1D/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![Waser\_I\_Solutions](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/waser_i_solutions/32/34937_2.png) [@Waser\_I\_Solutions](https://community.glideapps.com/u/Waser_I_Solutions)
#### Post date: [December 1, 2021, 10:07pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/8 "2021-12-01T22:07:00Z")

</div>

Thanks, that helps me. I could now create a pdf and save it in a folder in drive. I don’t know what to fill out for the google sheets so that the pdf is saved in the cell, can you help me?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 1, 2021, 11:44pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/9 "2021-12-01T23:44:37Z")

</div>

For my use cases in Integromat, this means having a column in the Sheet and your last node in Integromat writes back the Drive link to that document into the Sheet.

---

<div class="post-metadata">

### Author: ![Jesus\_Valenzuela\_Dia](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jesus_valenzuela_dia/32/22582_2.png) [@Jesus\_Valenzuela\_Dia](https://community.glideapps.com/u/Jesus_Valenzuela_Dia)
#### Post date: [December 2, 2021, 5:31am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/10 "2021-12-02T05:31:47Z")

</div>

Sure,

1. it is important to send the Row ID to integromat  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/f/8f5adfcc69193b71988826a7193e28c7d5944702.png)

2. Then you search in the proper google sheet that Row ID value to get the row number.  

3. Once found the row, update a cell using the variable of the row number and the column corresponding to the link, I write both links .doc and .pdf one at the time in different modules, for that for sure i use two different columns in google sheets.  

Hope this may help you.

---

<div class="post-metadata">

### Author: ![Waser\_I\_Solutions](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/waser_i_solutions/32/34937_2.png) [@Waser\_I\_Solutions](https://community.glideapps.com/u/Waser_I_Solutions)
#### Post date: [December 2, 2021, 10:13am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/11 "2021-12-02T10:13:23Z")

</div>

Thank you very much, again a great help in this community. my cell will not be filled, am i missing something? Does something already have to be in the cell so that it can be recognized?

 ![Bildschirmfoto 2021-12-02 um 11.13.01](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/6/d65f78d4f19ee4047a5b7c00e84b2ed56462e3d4.png)

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 2, 2021, 10:16am UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/12 "2021-12-02T10:16:36Z")

</div>

Seems like the search did not find the cell. You can try “update a row” and then put the right value in the right column.

---

<div class="post-metadata">

### Author: ![Waser\_I\_Solutions](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/waser_i_solutions/32/34937_2.png) [@Waser\_I\_Solutions](https://community.glideapps.com/u/Waser_I_Solutions)
#### Post date: [December 2, 2021, 12:09pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/13 "2021-12-02T12:09:10Z")

</div>

It worked, I used the wrong ID in the series.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [December 3, 2021, 12:09pm UTC](https://community.glideapps.com/t/pdf-creation-with-button/35339/14 "2021-12-03T12:09:57Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
