# Handling Text file

**URL:** https://discuss.tryton.org/t/handling-text-file/2099
**Category:** Developer
**Created:** [December 19, 2019, 8:50am UTC](https://discuss.tryton.org/t/handling-text-file/2099 "2019-12-19T08:50:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![prak](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/prak/32/321_2.png) [@prak](https://discuss.tryton.org/u/prak)
#### Post date: [December 19, 2019, 8:50am UTC](https://discuss.tryton.org/t/handling-text-file/2099/1 "2019-12-19T08:50:11Z")

</div>

I am trying to create a system to download the text file from client. (This text file has to be used by bank and hence needed to be provided manually to them).

1. If I use the reporting engine, (FODT to TXT), then it comes with a lot of binary data.
2. If I am using the reporting engine from TXT to TXT, then it expects some additional tags.
3. If I try to create the file in tmp folder, and then save it on a binary field, then it is not able to convert from TextIOWrapper to Binary.

What is best way to complete this task?

Can a text file be created and returned to the user on the click on a button ?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [December 19, 2019, 9:42am UTC](https://discuss.tryton.org/t/handling-text-file/2099/2 "2019-12-19T09:42:12Z")

</div>

Use a text template that generates a text file.  
This is full supported by the report engine like in the `account_es` module.
