This is an old revision of the document!


Documentation Generation::How to Use

Install

The GenDoc extension consists of two installables; one is the GenDoc extension itself and the other is a utility extension that will help you list and obtain the available labels in your system.

Both are installed as any other module using the Module Manager.

Activate

Once installed you will find both extensions accessible from the Tools menu but the normal usage will be through the detail view widget that will appear on all those modules that you activate the extension for. Click on the Settings icon for the document generator and enter the Activate Modules section to activate the extension on those modules you want.

Upload Templates

Templates are uploaded as documents in the Documents module. The only difference is that you must mark the “Template” checkbox and you must select the main module the template was created for in the “Module” picklist.

I recommend creating a folder to hold all your templates or various folders with names that make it easy to group the templates and distinguish them from other documents.

Merge

The merge process can be done in various ways. The most common way will be to go to the entity we want to merge, select the template that appears in the action panel and click on one of the available options:

  • Export Document: will merge the template starting from the record on screen and will send the result to the user
  • EMail Document: will merge the template starting from the record on screen and will open the email send screen with the result attached and ready to send
  • Save Document: will merge the template starting from the record on screen and will save it as a Document in the application. The application will save the document inside the first folder found but you can define where you want them to be saved using the GenDoc_Save_Document_Folder global variable

You can also execute a Mass Merge from the List view, where you will be able to select various records and a template and have the template merged for each selected record. You will be able to define if you want the output in individual PDFs or as one PDF.

Finally, the most flexible way to merge a template is by accessing the GenDoc extension directly. In this case, we will be presented with two capture fields where we will be able to select any template and any record of any entity and have the template merged with that record. We will also be able to specify the language we want the merge to use and if we want some verbose debug output which is rather useful while creating a new template.

Note that each template is created in one language and that is the language the process must use. By default, the process is run using the language of the user launching the process.

You can translate the directives to your language using the commands_en.php file inside the evvtgendoc folder.

PDF Output

In order to obtain a PDF from the generated OpenOffice file, we must have a special OpenOffice converter service installed and configured.

This service is a libreoffice headless and unconv listener which is capable of converting the .ODT generated by coreBOS into a PDF file. In fact, this service can convert any .ODT into any other format.

You can accomplish this in various ways

1.- install libreoffice headless and unconv in the same server you have coreBOS, then add the key pdflinks in the database

2.- use tsolucio service

3.- use the docker container xxx, define the gendocurk global variable and set the pdflinks

TSolucio has one prepared which you can use by either having a support contract with us or by purchasing our coreBOS Subscription service. Contact us for more details.

Obviously, you can open the OpenOffice document and click on the “PDF” button also.


coreBOS Documentación