PDF upload template for generated documents

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

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.

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?

Hello,

PDF no.
ODT yes

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