No announcement yet.

PDF to print will not print an interchanging Logo

  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF to print will not print an interchanging Logo

    Has been resolved already: I should have tested the images before. One jpg apparently had been wrong coded by any editor-program. It was visible in the entity and also offline, but when I tried to open the image link in another browser window: nothing.
    Opened with Photoshop and saved again. Now it is working.

    Hi, again a problem with the Print to PDF:

    I have a template, that contains a logo, which is derived from an image field in my entity. This so far works by using the image tag.

    Now I have a situation, where I need the same template, but the logo must be exchanged by a condition.

    First I made a bool field for the condition, than I saved both logos each one in an image field of its own. logo1 and logo2. Furthermore I have one field simply named logo. By formula
    I set the image in the field logo by condition: if the condition is true, logo equals logo1, if false logo equals logo2. So far so easy and working in the entity.

    To place the image, that will be in the field logo, I use this code:

    {{#ifEqual nameOfBool true}} {{imageTag logoId width=180 height=auto}}{{/ifEqual}}
    for logo1 (which ist displayed in the field logo on bool true) and

    {{#ifEqual nameOfBool false}} {{imageTag logoId width=180 height=auto}}{{/ifEqual}}
    (where because of bool false the image was exchanged)

    The PDF on bool true displays the correct image, which is also present in the record.
    The PDF does not display the image on boolfalse, although it is displayed in the record.

    I also thought, it would be enough, to simply place
    {{imageTag logoId width=180 height=auto}}
    , because, the conditional exchanging already happens in the record, but that did not work either.

    Where am I wrong, if so?

    Last edited by shalmaxb; 06-14-2022, 01:50 PM.