For the syntax-highlighting of EDI messages the following two files are responsible:

  • R2EdiViewerSH.css
  • R2EdiViewerSH.cfg

The syntax-highlighting of XML files cannot be changed.

4.2.1. R2EdiViewerSH.css


With cascading style sheets:

  1. the formatting of segments and fields is set.
  2. the mapping Unicode block to Windows TrueType font (.ttf-file) is defined. Mapping Unicode block to Windows TrueType font

Both for the correct syntax-highlighting and for PDF creation
(embedding the font in the PDF file ) the appropriate TrueType font must be determined.
At first the Unicode block for each character of the EDI file is determined.
After that the suitable font is determined by the ".font_"-Unicode block line.
You get a message to maintain this file if it is not possible to identify the font.

As "font-family" the font name must be specified not the name of the TTF file,
e.g. "Courier New" for the file "cour.ttf".


4.2.2. R2EdiViewerSH.cfg

The formatting of segments / record types or individual fields follows. Segments/record types 

An EDI segment / record type is simply linked to the desired CSS formatting.
- PAC segment red
- QTY segment bold blue
- UNB segment bold black Fields 

Besides the segments, you can format several fields in color.
Simply add the field number behind the EDI segment and
the CSS formatting have to begin with "field":
- UNH, field 0065 (Message type), bold black with grey background:

If the CSS formatting for a field does not start with "field", the entire line will be formatted.