# Won't create odt.files from template

**URL:** <https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423>\
**Category:** Installing my Dolibarr\
**Tags:** Help, Issue\
**Created:** [June 8, 2024, 11:08pm UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423 "2024-06-08T23:08:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jccs811](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/jccs811/32/394_2.png) [@jccs811](https://www.dolibarr.org/forum/u/jccs811)\
**Post date:** [June 8, 2024, 11:08pm UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/1 "2024-06-08T23:08:40Z")

</div>

**Warning** : Invalid argument supplied for foreach() in **/home/bronsonr/public\_html/account2/includes/odtphp/odf.php** on line **277**

Won’t create odt.files from template

---

<div class="post-metadata">

**Author:** ![eldy](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/eldy/32/12_2.png) [@eldy](https://www.dolibarr.org/forum/u/eldy)\
**Post date:** [June 9, 2024, 7:54am UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/2 "2024-06-09T07:54:38Z")

</div>

What is your Dolibarr version, and what is the odt template you use ?

---

<div class="post-metadata">

**Author:** ![umigun](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/umigun/32/7276_2.png) [@umigun](https://www.dolibarr.org/forum/u/umigun)\
**Post date:** [June 12, 2024, 12:28pm UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/3 "2024-06-12T12:28:05Z")

</div>

I suggest you check here, if the problem persists, write again.

> [@ODT 2 PDF](https://www.dolibarr.org/forum/t/odt-2-pdf/17414/16):
>
> hello, i have the same problem. The conversion completes when I test it on the server. but after creating ODT file in dolibarr it comes with .odt extension. I still haven’t been able to solve the problem. thank you for your help Doli version : 14.0.2 Server : Centos 7 - Cpanel/Whm host: PHP version 7.4 I tried this solution published by ### [h6585](https://github.com/h6585) . (of course all other solutions didn’t work) [https://github.com/Dolibarr/dolibarr/issues/10896](https://github.com/Dolibarr/dolibarr/issues/10896) MAIN\_DOL\_SCRIPTS\_ROOT = /home/xx/public\_html…

---

<div class="post-metadata">

**Author:** ![jccs811](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/jccs811/32/394_2.png) [@jccs811](https://www.dolibarr.org/forum/u/jccs811)\
**Post date:** [June 12, 2024, 1:39pm UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/4 "2024-06-12T13:39:39Z")

</div>

I am using 19.0.2 this same problem has existed since version 16 and has never been fixed it creates the template but the item prints only the top line of the item not the full line see image here this is what I get

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/c/cb7d747ab195a81abff69ea864d0692390320050.png)

This is what I’m supposed to get this one made on version 11.0.4

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/9/917337b096ddbc568cd534ec2b71f03434a3f5a1.png)  
it works correctly on 11.0.4 but not on the latest version It also displays an error at the top of the page indicating that there is an error in the odtphp file shown here  
 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/c/c8ff5519348f74a18ce4643757921e5206b0db1f.png)  
I have replaced the whole folder with the version from 11.0.4 and it works correctly

---

<div class="post-metadata">

**Author:** ![jccs811](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/jccs811/32/394_2.png) [@jccs811](https://www.dolibarr.org/forum/u/jccs811)\
**Post date:** [June 12, 2024, 1:49pm UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/5 "2024-06-12T13:49:00Z")

</div>

The template

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/e52225e345d49e62dad1ce6dfd251eca536ffeb8.png)

---

<div class="post-metadata">

**Author:** ![eldy](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/eldy/32/12_2.png) [@eldy](https://www.dolibarr.org/forum/u/eldy)\
**Post date:** [July 20, 2024, 9:14am UTC](https://www.dolibarr.org/forum/t/wont-create-odt-files-from-template/25423/6 "2024-07-20T09:14:32Z")

</div>

Template looks good.  
Trouble may be in the content of line desceiption. Can you try with a description of 3 lines only, and remove the ------ into it.  
What happen ?  
Can you make a var\_dump of this 3 lines so we can see if new line separator is \n or   
…
