# Setup dolibarr to generate ODT to PDF

**URL:** <https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112>\
**Category:** Installing my Dolibarr\
**Created:** [April 2, 2022, 3:41pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112 "2022-04-02T15:41:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![VincentKun](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@VincentKun](https://www.dolibarr.org/forum/u/VincentKun)\
**Post date:** [April 2, 2022, 3:41pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/1 "2022-04-02T15:41:36Z")

</div>

Hi, i had currently installed dolibarr into my nas synlogy virtual web station, can anyone teach me step by step on how i can make dolibarr to generate odt to pdf. as im using odt template.

thank you

---

<div class="post-metadata">

**Author:** ![RiseValInfotech](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/r/41988e/32.png) [@RiseValInfotech](https://www.dolibarr.org/forum/u/RiseValInfotech)\
**Post date:** [April 4, 2022, 3:45am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/2 "2022-04-04T03:45:20Z")

</div>

Simple.

Step1: Go to Home \> Setup \> Modules

and select which ever module you want to add the ODT. For example Invoice …

Step 2: Click on Settings icon of Invoice module and click Miscellaneous.

Step 3 : Upload the ODT file there

Step 4. Click Invoices on the Menu and create a test invoice

Step 5: Select the Invoice ODT File name you have uploaded and Click “Generate” button

and Volia, you will have a PDF and .ODT invoices.

You can follow this document : [Create an ODT document template - Dolibarr ERP CRM Wiki](https://wiki.dolibarr.org/index.php?title=Create_an_ODT_document_template) for the tags

thanks  
yesbee.

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [April 4, 2022, 7:51am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/3 "2022-04-04T07:51:04Z")

</div>

Hello,

If you use ODT model, you have ODT output.

There is a possibility to convert automatically ODT in PDF, but this required to install :

- Java
- Libre office
- jodconverter

Then you can set-up the additional variable: MAIN\_ODT\_AS\_PDF to jodconverter

Not sure how to get all this on Synology

---

<div class="post-metadata">

**Author:** ![gabzee](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gabzee](https://www.dolibarr.org/forum/u/gabzee)\
**Post date:** [April 19, 2023, 11:01pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/5 "2023-04-19T23:01:14Z")

</div>

i was trying to do the same thing, didnt find a solution yet, i am running it on my synology webserver. is there no other way around it? some website or some docker solution that runs the conversion?  
Thank you

---

<div class="post-metadata">

**Author:** ![gabzee](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gabzee](https://www.dolibarr.org/forum/u/gabzee)\
**Post date:** [April 19, 2023, 11:02pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/6 "2023-04-19T23:02:14Z")

</div>

did you ever find a solution? i am running it the same way

---

<div class="post-metadata">

**Author:** ![VincentKun](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@VincentKun](https://www.dolibarr.org/forum/u/VincentKun)\
**Post date:** [April 19, 2023, 11:47pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/7 "2023-04-19T23:47:44Z")

</div>

No gabzee, i tried use docker to install libre office and just can get the script to work. I now still using the manual way. Use open office to open the odt and print in pdf. I am still looking for the solution.

---

<div class="post-metadata">

**Author:** ![gabzee](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/g/5f8ce5/32.png) [@gabzee](https://www.dolibarr.org/forum/u/gabzee)\
**Post date:** [April 20, 2023, 12:06am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/8 "2023-04-20T00:06:39Z")

</div>

Thank you for the feedback and update, I’ll update you if i come across a way .

---

<div class="post-metadata">

**Author:** ![GRIFFCOMM](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/griffcomm/32/3462_2.png) [@GRIFFCOMM](https://www.dolibarr.org/forum/u/GRIFFCOMM)\
**Post date:** [May 22, 2023, 6:32pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/9 "2023-05-22T18:32:04Z")

</div>

I am told this is now “fixed”, no external plugins required, am still looking on the forum for the answer

---

<div class="post-metadata">

**Author:** ![Klaas](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/klaas/32/486_2.png) [@Klaas](https://www.dolibarr.org/forum/u/Klaas)\
**Post date:** [June 7, 2023, 6:05am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/10 "2023-06-07T06:05:04Z")

</div>

Hi there,  
Maybe this is what you are looking for.  
Go to other settings and add the setting: MAIN\_ODT\_AS\_PDF with the value: libreoffice  
(Libre Office must be installed at the server.)

---

<div class="post-metadata">

**Author:** ![VincentKun](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/v/839c29/32.png) [@VincentKun](https://www.dolibarr.org/forum/u/VincentKun)\
**Post date:** [November 26, 2023, 3:37pm UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/11 "2023-11-26T15:37:53Z")

</div>

> [@RiseValInfotech](#):
>
> Click on Settings icon of Invoice module and click Miscellaneou

Hi griffcom, have you come across any solutions?

---

<div class="post-metadata">

**Author:** ![GRIFFCOMM](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/griffcomm/32/3462_2.png) [@GRIFFCOMM](https://www.dolibarr.org/forum/u/GRIFFCOMM)\
**Post date:** [January 27, 2024, 5:09am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/12 "2024-01-27T05:09:54Z")

</div>

This was pushed down the list (abit) due to other work, however its still live so will post back if i have more details.

---

<div class="post-metadata">

**Author:** ![umhauer](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/u/d26b3c/32.png) [@umhauer](https://www.dolibarr.org/forum/u/umhauer)\
**Post date:** [December 15, 2024, 9:49am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/13 "2024-12-15T09:49:53Z")

</div>

edit the docker-compose file:

add the entrypoint:

```auto
....
    web:
        image: dolibarr/dolibarr:latest
        entrypoint: >
          sh -c "apt-get update && apt-get install -y unoconv && rm -rf /var/lib/apt/lists/* &&
                  exec docker-run.sh apache2-foreground"
...

```

starting up takes some time until everything is installed

than add this variable in the extendet settings: “MAIN\_ODT\_AS\_PDF” with the value “unoconv”  
and optional:  
“MAIN\_ODT\_AS\_PDF\_DEL\_SOURCE” with “1” e voilá. it will generate pdf from odt

enjoy

---

<div class="post-metadata">

**Author:** ![ghiggins](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/g/a183cd/32.png) [@ghiggins](https://www.dolibarr.org/forum/u/ghiggins)\
**Post date:** [March 5, 2025, 1:23am UTC](https://www.dolibarr.org/forum/t/setup-dolibarr-to-generate-odt-to-pdf/22112/14 "2025-03-05T01:23:51Z")

</div>

Thanks @umhauer

This made a huge difference to my test/dev set-up; although I had to set MAIN\_ODT\_AS\_PDF to “libreoffice” otherwise I received an error, when creating the PDF.

For anybody else reading, if you aren’t using a standard Libre Office font you will need to include the font packs as well, according to my Googling; fonts are stored at /usr/share/fonts.

I use portainer to manage my environment, the easiest way I have found is mount a volume as part of the stack/compose; once up and running; log in using a terminal then copy the font folder from the volume to /usr/share/fonts.
