PDF Template error, bug or bad development?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eduardofendrich
    Member
    • Jul 2021
    • 49

    PDF Template error, bug or bad development?

    Hi,

    I'm trying to create a PDF template. I have 2 entities, one master, one detail. Master has one-to-many relationship with detail entity.

    My PDF template code is

    <p><b>{{name}}</b></p>
    {{#each ejemploDetalles}}
    {{name}}<br>
    {{/each}}
    <hr>

    Already in Photo 1, and the result is displayed in Photo 2.

    But, I can't find where is the "?" coming from...

    I'm using version 7.0.10.

    Any idea about the question mark?

    Thanks in advance


    Eduardo
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1603

    #2
    Hi,
    the PDF engine is weird sometimes (if not always) and it takes time to understand all the caveats it introduces besides a "normal" HTML.
    In your case, go back to your template in Code view and see, if there is any space, where the ? is, if you made any return in your code (yes, sometimes a plain linefeed causes errors in the appearance of the PDF).
    You should partly forget, what you learned about good looking code, the template engine does not like that. Sometimes the template itself introduces tags, that you never wrote. And you will see that only after saving.

    Comment

    • eduardofendrich
      Member
      • Jul 2021
      • 49

      #3
      Thanks! There was a hidden character (probably a linefeed).

      Now it works!

      Comment

      • cdmindya
        Junior Member
        • Dec 2020
        • 12

        #4
        Its good to copy the code to a notepad or notepad++ and see if any special characters slip into the code which may not be visible in the WYSIWYG

        Comment

        Working...