**Set-up**

I have an empty Google Sheet invoice template in a folder.

Using Python, Gspread and PyDrive I duplicate the template and populate the copy with data. 

---

**Question**

Customers need to receive a pdf of the invoice, not a google sheet. 

I came across [this question](https://stackoverflow.com/q/51329367/7326714) where is stated how to export a sheet locally into a pdf, namely,

```
file_obj = drive.CreateFile({'id': 'sfkldjlfsdkjfgdklj'})
file_obj.GetContentFile('temp.pdf', mimetype='application/pdf')

```

How can I create a PDF of the google sheet, but instead of downloading the PDF locally store it in the same Google Drive folder as the Google Sheet?