Usage
Automatic operation
Once the module is set up, DoliPDF works transparently. You have nothing in particular to do: the conversion happens automatically when Dolibarr generates a document from an ODT template.
Conversion flow
- You generate a document in Dolibarr (invoice, proposal, order, etc.) using an ODT template
- Dolibarr creates the ODT file
- DoliPDF catches the creation of the ODT file
- Depending on the mode set up:
- Remote mode: the ODT file is sent to the DoliPDF server, which returns the converted PDF
- Local mode: LibreOffice performs the conversion on your server
- The PDF file is saved and indexed in Dolibarr
- If the option is enabled, the source ODT file is deleted
Documents concerned
DoliPDF works with every type of Dolibarr document that uses ODT templates:
- Customer invoices
- Commercial proposals
- Customer orders
- Supplier invoices
- Supplier orders
- Contracts
- Interventions
- Any other document using an ODT template
Notifications
If you enabled the Display notifications option, a message appears at the top right of the screen after each conversion:
- DoliPDF server has generated the PDF file - The conversion succeeded.
- Error transferring PDF file from DoliPDF server - The PDF file was received but the MD5 integrity check failed. The PDF file may be corrupted.
- DoliPDF error - The conversion failed. Check the setup of the module and the connection to the DoliPDF server. If in doubt, the Test connection button of the Configuration tab gives the cause.
Selective conversion
If you enable the Run DoliPDF only on validated documents option, the conversion only starts for documents with the "Validated" status. Draft documents do not generate a PDF.
This is useful to:
- Save calls to the remote service while a document is being written
- Avoid generating useless intermediate PDFs
- Reduce the load on the server in local mode
Checking the generated files
After the conversion, the PDF file is visible in the Linked files tab of the document concerned. You can download it, preview it or send it by email directly from Dolibarr.
If the Delete ODT file option is enabled, only the PDF file appears in the linked files. Otherwise both files (ODT and PDF) are kept.