Resolve Error: “The template cannot be printed due to the following errors > The string “–” is not permitted within comments” on Advanced PDF/HTML Template

When printing using Advanced PDF/HTML Template, a user can get an Error: “The template cannot be printed due to the following errors > The string “–” is not permitted within comments” which means that the system detected the reserved character mentioned as a part of the source code. If the character is not in the code, it was possibly detected from a source field.

The sample setup of Entity field and Advanced PDF/HTML Template source code below will return an error as it recognizes the entity value that has a reserved character “–“.

Entity : 1234 Test–Anonymous

Advanced PDF/HTML Template Source Code : <!– ${record.entity}–>

Solution

Remove the commented code or update the value of Entity name and delete the reserved character

Leave a comment

Your email address will not be published. Required fields are marked *