IDRE: HTML and printing to PDF
linkDescription
You can include HTML in spans and print the book to PDF. To do this, simply enter the HTML text in one or more spans, set the span mask to "=", and print the book to PDF.

HTML text entered in an IMDB table used as data source for a report. The span mask is set to "=".

HTML preview: the book shown in preview shows the HTML text. It is displayed directly in the browser.

Result when the book is printed to PDF.
Features involved
Printing books containing HTML text to PDF.
Notes
- Improvement related to change proposal PRP000009.
- The HTML text must be valid, or the span will be displayed in plaintext and a warning message will be generated in the debug form.
- The system analyzes the HTML text and replaces the span containing the HTML text with one or more formatted spans. Specifically:
- the system discards META, SCRIPT and STYLE nodes;
- for each B or STRONG node, all the spans "contained" in the node will be bold (that is, the FontModifiers property for the corresponding spans will be set to "B");
- for each I node, all the spans "contained" in the node will be italic (that is, the FontModifiers property for the corresponding spans will be set to "I");
- if a node has the style attribute, the system checks whether it contains the color and background-color attributes, and all the spans "contained" in the node will have the text (TextColor property) and background (BackgroundColor) color with the corresponding value;
- if a font node is found and it contains the color attribute, the color is extracted and is used as the TextColor for all spans "contained" in the font node.
- if a P node is found, a Return character is inserted before the first span contained in the P node (unless the previous node in turn is also a P node). Also, a Return character is inserted at the end of the P node;
- if a text type node is found, the corresponding span will be created.
- The colors (COLOR and BACKGROUND-COLOR properties) can be indicated in text form (e.g.: "red") or in hexadecimal numeric form (e.g.: #ff0000).
Changed on: 15/11/2018 / From version: 18.5.7200