# Print to PDF instead of ODT

**URL:** <https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799>\
**Category:** System Administrator\
**Created:** [December 18, 2023, 10:15pm UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799 "2023-12-18T22:15:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)\
**Post date:** [December 18, 2023, 10:15pm UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/1 "2023-12-18T22:15:41Z")

</div>

Hi all, I would like to configure Tryton to print reports to PDF instead of downloading ODT files (e.g. sales orders, pick lists, delivery orders, purchase orders, etc.).

I am trying to follow @pokoli’s direction in [Odt to pdf while printing?](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188), but when I access the Action Report model (Tryton 6.8), I do not see a “Report Extension” field (I see “extension” and “template\_extension” but not “report\_extension”). Can anyone help me with this? Am I missing something? Has the name of the field changed?

trytond and modules are installed in a venv on the host (I am _not_ using Docker), and will be installing libreoffice 7.6.2.1 on the host to use headless (the server has no desktop GUI). Tryton users will primarily use the web client (i.e. sao).

Also, from browsing the fields I do see in the Action Report model, it does not seem obvious (at least to me 😉 ) how to enter a field value (“Portable Document Format” per @pokoli ). Some further hints to this regard would also be very much appreciated!

 ![2023-12-18 20_40_57 Administration - Models - Models](https://discuss-cdn.tryton.org/uploads/default/original/2X/3/3be598f08cd84166a86ef1758d818008c3212f90.png)

---

<div class="post-metadata">

**Author:** ![lars\_wuerfel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/lars_wuerfel/32/2794_2.png) [@lars\_wuerfel](https://discuss.tryton.org/u/lars_wuerfel)\
**Post date:** [December 19, 2023, 4:04am UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/2 "2023-12-19T04:04:33Z")

</div>

I think that the menu item you are looking for is

Administration → User Interface → Actions → Reports

In the form view of the report you want as .PDF, on the bottom rigt, there is the field “Extension”, where you can choose “Portable Document Format”.

---

<div class="post-metadata">

**Author:** ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)\
**Post date:** [December 19, 2023, 4:40am UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/3 "2023-12-19T04:40:46Z")

</div>

Thanks @lars_wuerfel for your help. Unfortunately I do not see “Portable Document Format” as a choice when I accessed the Sale report.

Could I possibly still be looking in the wrong place? Or is it possible PDF is not listed as a selection because libreoffice is not installed yet? (I will install in the morning and check again)

 ![2023-12-18 21_33_40 Administration - User Interface - Actions - Reports](https://discuss-cdn.tryton.org/uploads/default/original/2X/1/1901bd709f1bc7f3a999a06e9d7504b47b21229e.png)

 ![2023-12-18 21_33_40 Administration - User Interface - Actions - Reports - Sale](https://discuss-cdn.tryton.org/uploads/default/original/2X/e/eebc7ed722ddc1c3d545d349dfd7f26ce5d08407.png)

---

<div class="post-metadata">

**Author:** ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Post date:** [December 19, 2023, 5:57am UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/4 "2023-12-19T05:57:43Z")

</div>

It’s in the ‘Extension’ field not ‘Template Extension’.

---

<div class="post-metadata">

**Author:** ![lars\_wuerfel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/lars_wuerfel/32/2794_2.png) [@lars\_wuerfel](https://discuss.tryton.org/u/lars_wuerfel)\
**Post date:** [December 19, 2023, 6:00am UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/5 "2023-12-19T06:00:29Z")

</div>

> [@dalers](#):
>
> Or is it possible PDF is not listed as a selection because libreoffice is not installed yet?

Yes, LibreOffice has to be installed on the Tryton server, because the conversion to PDF is done with it.

You leave “Template Extension” to “Open Document Text” (this is the source format of the template) and set “Extension” to PDF (see Screenshot).

 ![Screenshot_Tryton_20231219_065108](https://discuss-cdn.tryton.org/uploads/default/original/2X/5/598be8e1facdc6401646881d64b716517ba58134.png)

---

<div class="post-metadata">

**Author:** ![dalers](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/dalers/32/1767_2.png) [@dalers](https://discuss.tryton.org/u/dalers)\
**Post date:** [December 19, 2023, 7:42pm UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/6 "2023-12-19T19:42:30Z")

</div>

Thanks @lars_wuerfel and @2cadz for pointing out my error! I found I also had to restart trytond, but suspect restarting was required after installing LibreOffice, and not related to changing the Extension to PDF.

I also found I had to create a /home/tryton/.config/libreoffice/ directory (the trytond process is owned by user tryton) or LibreOffice would fail creating a PDF reporting “javaldx failed” and “Fontconfig error: No writable cache directories” errors. Thanks to StackOverflow for [the solution](https://stackoverflow.com/questions/60414557/warning-failed-to-read-path-from-javaldx) (1st answer gives correct cause, but the 6th answer is the “correct” solution)

Cheers and thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [December 20, 2023, 7:43am UTC](https://discuss.tryton.org/t/print-to-pdf-instead-of-odt/6799/7 "2023-12-20T07:43:13Z")

</div>

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