a lexical error generally refers to an issue with the syntax or structure of code. In the context of a PDF template, especially in systems like NetSuite that use template languages (e.g., FreeMarker), this can occur when there is an invalid token, character, or improperly written expression in the template.
Such errors could arise from:
- Incorrect use of variables or expressions.
- Unclosed or mismatched brackets or tags.
- Use of undefined or incorrect symbols.
- using HTML elements inside a FreeMarker-specific logic and directives.
The result would usually be a failure in the template rendering process or an incorrect PDF output.