by Izertis

Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.

Includes a 30 day guarantee
Try it Now

#613 - howtio add an image to a template

Closed General Question created by bertvancapelle 6 years ago

Hi there,

I have a image field in the Relations module (i.e. company logo)

Name Label. Type * logo_c. Logo. Image

This field can be filled within SuiteCRM and show perfectly. I cannot however add this field into a template?! This field is in Studio but I cannot see this field (type??) in the Mail Merge filed list.

Goal (obviously) is to create a template with the customer logo generated from SuiteCRM.

Please advise how to incorporate a logo into a template.

  1. dharma member avatar

    Izertis Provider

    6 years ago

    Hi there,

    Please, review the section "Images" in the MMR user manual to see how to manage images into MMR plugin, you should note that the variable to display an image must always be a path to disk of the image, so that the document generator can find it. And, sorry, we don't know about the Relations module that you mentioned.

    Regards,

    Anabel

    Note: Images (manual section): You can use the default 'cf_image_file_path' calculated field for Notes and Documents modules. If attached file to a Note or Document is an image (jpg, png, gif o tiff), we can merge the image to the generated document. Example: [a_sub1.cf_image_file_path;ope=changepic;default=current;adjust]

    (*) Change an internal picture with a new one: When having "ope=changepic" is merged in the template, then will search the first picture located before the field, and then it will change the picture assuming that the value of the field is the path for a picture file on the server.

    They are other complementary parameters that are provided for the changepic parameter:

    Default -- Define the picture that should be used when the expected one is not found. The parameter's value must be the path of a file on the server (default=uploads/empty.jpg) or the keyword "current". If you've set "default=current" then will let the picture of the template if the expected one is not found. Adjust -- Adjust the size of the picture in the document. This parameter requires that PHP is configured with the GD extension, which is usually the case. Values for adjust can be on of the followings: adjust (or adjust=inside) The picture is adjusted to enter into the picture bounds of the template. adjust=samewidth The picture is adjusted to have the same width than the picture of the template. adjust=sameheigth The picture is adjusted to have the same height than the picture of the template. adjust=100% (or another percentage) The picture is adjusted to be proportional to the originial size. The component will install the template example "EXAMPLE - Opportunities Notes and Documents Images" associated to the Opportunity module in order to test this kind of variables. This example can be found also in the next path: "modules/DHA_PlantillasDocumentos/examples/Opportunities_Notes_and_Documents_Images.docx"

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "It has improved our processes so much! Admin cut in half! We send a webform to clients to sign up straight into CRM then generate and print their paperwork to sign."

    Read More Reviews