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>
|
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;" }
|
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.
|