# PDF upload template for generated documents

**URL:** <https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874>\
**Category:** Developing for Dolibarr\
**Tags:** PDF-Templates\
**Created:** [October 4, 2022, 8:27pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874 "2022-10-04T20:27:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![karozans](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@karozans](https://www.dolibarr.org/forum/u/karozans)\
**Post date:** [October 4, 2022, 8:27pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874/1 "2022-10-04T20:27:47Z")

</div>

Hi everyone.

I have many customers that use my dolibarr instance, and each one of them has a currently existing and different PDF they want to generate and have all the data filled out.

Is it possible to upload a PDF as a template with fields in it, and then when clicking on “generate”, it dolibarr automatically populates the fields in this template, and saves it in the module?

Thanks

---

<div class="post-metadata">

**Author:** ![milenmk](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/milenmk/32/4128_2.png) [@milenmk](https://www.dolibarr.org/forum/u/milenmk)\
**Post date:** [October 6, 2022, 3:48pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874/2 "2022-10-06T15:48:14Z")

</div>

Hi there.

Unfortunately, there is no straight answer to your question. Also, it is not clear what exactly is the PDF they want to generate - proposal, order, invoice, etc.

The short answer is no. The long answer is:

1. it is possible to create custom .odt template for each customer
2. An external module can be written so it can attach each .odt to each customer, so they can use it, and then generated the needed document

Anyway, more information is needed for a final answer to your question.

---

<div class="post-metadata">

**Author:** ![karozans](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@karozans](https://www.dolibarr.org/forum/u/karozans)\
**Post date:** [October 6, 2022, 4:33pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874/3 "2022-10-06T16:33:00Z")

</div>

Thanks for the reply. What I am doing is I am setting up Dolibarr instances for many different customers of mine. Each of my customers have dozens of PDF documents that they have their customers sign. Since they are all different companies, they have all different documents from each other. Company A has an invoice that is totally different than Company B.

I know how to make new PDF templates out of PHP code. However, this would take me 100 years to code create templates in PHP code for each of my customers and all of their documents.

What I would like to be able to do is have them upload their current PDF as a template or perhaps another type of document, and then I can tell them which fields they need to have, and then when they click Generate, it will generate a PDF that is from their own uploaded template.

Is that possible to do with Dolibarr now? Or does that only work with ODT templates?

---

<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:** [October 6, 2022, 7:57pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874/4 "2022-10-06T19:57:52Z")

</div>

Hello,

PDF no.  
ODT yes

---

<div class="post-metadata">

**Author:** ![karozans](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/439d5e/32.png) [@karozans](https://www.dolibarr.org/forum/u/karozans)\
**Post date:** [October 7, 2022, 3:27pm UTC](https://www.dolibarr.org/forum/t/pdf-upload-template-for-generated-documents/22874/5 "2022-10-07T15:27:12Z")

</div>

Ah okay thank you. Perhaps there is a utility that I can use to generate an ODT and then convert to PDF later. I will see what I can find. thanks
