# Odt to pdf while printing?

**URL:** https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188
**Category:** Developer
**Created:** [April 21, 2022, 8:01am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188 "2022-04-21T08:01:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![deathrake](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@deathrake](https://discuss.tryton.org/u/deathrake)
#### Post date: [April 21, 2022, 8:01am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/1 "2022-04-21T08:01:06Z")

</div>

So we are building custom reports in Shipments . I was thinking a way where we get the pdf instead of odt while printing ?

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 21, 2022, 8:13am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/2 "2022-04-21T08:13:52Z")

</div>

Yes, on the _Action Report_ model there is a _Report Extension_ field. Setting this field to _Portable Document Format_ will indicate the server that a conversion to PDF should be done before showing the report to the user.

Please note that you will need to have libreoffice installed on your server. If you are using the docker image, make sure to use the tags with `-office` suffix (i.e `6.2-office`).

---

<div class="post-metadata">

### Author: ![deathrake](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@deathrake](https://discuss.tryton.org/u/deathrake)
#### Post date: [April 25, 2022, 9:07am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/3 "2022-04-25T09:07:32Z")

</div>

Hey @pokoli  
I tried running the following command

```auto
`docker run --name aal-berm -p 8047:8000 --link aal-postgres:postgres -e DB_PASSWORD=mysecretpassword -d tryton/tryton -office`

```

I am still getting the following error

```auto
uwsgi: unrecognized option '--office'

```

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [April 25, 2022, 9:24am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/4 "2022-04-25T09:24:55Z")

</div>

> [@deathrake](#):
>
> `tryton/tryton`

You should use `tryton/tryton:office` as docker image if you want to use the latests one.

---

<div class="post-metadata">

### Author: ![deathrake](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@deathrake](https://discuss.tryton.org/u/deathrake)
#### Post date: [April 25, 2022, 9:39am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/5 "2022-04-25T09:39:41Z")

</div>

Hey  
Thanks for the reply I was thinking how could I do the same for 5.8 tryton

---

<div class="post-metadata">

### Author: ![deathrake](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/b487fb/32.png) [@deathrake](https://discuss.tryton.org/u/deathrake)
#### Post date: [April 25, 2022, 9:42am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/6 "2022-04-25T09:42:08Z")

</div>

Never mind  
I used the tag `tryton/tryton:5.8-office` it sorted the issue

---

<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: [May 25, 2022, 9:42am UTC](https://discuss.tryton.org/t/odt-to-pdf-while-printing/5188/7 "2022-05-25T09:42:34Z")

</div>

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