Consideration for Output Doc Template Design
The following table explains the considerations and the best practices to be followed with output document template design.
Scenario
Recommendation
Handling external links in Output Document
Add target="_blank" in the anchor tag in the HTML template to open the external link in a new window. Example: <a href=”htttps:www.servicemax.com/docs” title=”Servicemax Docs” target=”_blank”>ServiceMax Docs</a>
Handling Boolean data types in Expression
FSA SQLite DB does not have a native Boolean data type class and uses True/False values instead. Convert Boolean values (true or false) to string values ("true" or "false") in the template.
Example: String($D.Work_order.Is_PM_Work_Order__c).toLowerCase() === “true”
Text wrap
Using CSS property for word-wrap property allows to break long words and wrap onto the next line. Values of word-wrap property: normal|break-word|initial|inherit;normal is used to break words only at allowed breakpoints break-word allows unbreakable words to be broken Example:table { word-wrap: normal|}
Table overlapping issue with content or image inside the table cell
The width of the table is calculated from the content of the table, leading to overlapping.
Use table-layout: fixed to prevent the overlapping issue. With this value, the table’s layout ignores the content and instead uses the table’s width, specified width of columns, and border and cell spacing values. The column values used are based on widths defined on columns or cells for the first row of the table.
Example:table { table-layout: fixed;" }
Font issue with Chinese, Japanese, and Korean language
In FSA for Windows, always install the fonts of the languages in the user machine to avoid displaying incorrect symbols (???) instead of text.
Image overlapping
in a table cell
Use the table-layout property to fit into the table cell and use the image size. The PDF document width is 590px in size, so the layout width inside the template should less than 590px width for proper positioning of the HTML element in the template. Example: table-layout: fixed! important; }
An issue with Margin/Padding/Font size
Design the template for 590 px width and provide less margin/padding to avoid issues with margin/ padding and find size.
Was this helpful?