HTML Elements in PDF Output

A variety of html elements are now available for use in formating data in PDF reports created by APPX output processes.

HTML tags may be embedded within an ALPHA field or a TEXT field to specify how the field value is to be formated when printed.

The field must be added to the image with a widget type of LABEL or TEXT AREA.

The field value must begin with "<html>".  The entire contents of the field will then be considered to be HTML text.

HTML tags are not case sensitive.  They may be entered as upper case or lower case.

If no widget is specified or if a RAW TEXT widget type is specified, the contents of the field will be printed without formating.

The label value of a LABEL widget may contain HTML tags as a way of formating the label value when printed.

Standard APPX text formating within a TEXT field is compatible with html formating as follows:

  • An APPX end-of-paragraph character ("¶" - xB6/182) has the same effect as a <br> element.
  • An APPX required space character ("_" - x5F/95) has the same effect as a &nbsp; (no break space). 

When an ALPHA field that contains end-of-paragraph characters ("¶") or underline characters ("_") is printed, these characters are not interpreted as text formating characters and are instead printed like any other characters regardless of whether the field contains HTML elements.

Supported Elements:

Top Level Elements:

  • HTML - HTML document

Generic Block Level Elements:

  • CENTER - Centered block
  • H1 - Level-one heading
  • H2 - Level-two heading
  • H3 - Level-three heading
  • H4 - Level-four heading
  • H5 - Level-five heading
  • H6 - Level-six heading
  • P - Paragraph
  • PRE - Preformated text

Special Inline Elements:

  • A - Anchor
  • BR - Line break
  • FONT - Font change
  • SUB - Subscript
  • SUP - Superscript

Phrase Elements:

  • EM - Emphasis
  • STRONG - Strong emphasis

Font Style Elements:

  • B - Bold text
  • BIG - Big text
  • I - Italic text
  • SMALL - Small text
  • TT - Teletype text
  • U - Underlined text

 

BIG - The enclosed text should be printed one size larger than the current font size.  <BIG>...</BIG> is the same as <FONT SIZE="+1">...</FONT>.  BIG tags can be nested in which case the inner text is one size larger than the outer text.

SMALL - The enclosed text should be printed one size smaller than the current font size. <SMALL>...</SMALL> is the same as <FONT SIZE="-1">...</FONT>.  SMALL tags can be nested in which case the intter text is one size smaller than the outer text.

Relative font sizes are supported <font size="+n">  or <font size="-n"> 

Absolute font sizes are supported <font size=n> where n=1 to 28. 

font color=#nnnnnn where #nnnnnn is a RGB hex value.

font color=name is not supported.

font size=1 thru 28

Size Scale
 1  25%
 2  33%
 3  50% 
 4  66%
 5  75%
 6  80%
 7  85%
 8  90%
 9  95%
 10  100%
 11  
 12  
 13  
 14  
 15  
 16  
 17  
 18  
 19  
 20  
 21  
 22  
 23  
 24  
 25  
 26  
 27  
 28  

25%, 33%, 50%, 66%, 75%, 80%, 85%, 90%, 95%, 100%

APPX support 28 font sizes which are scaled relative to the default font size for the report.

The default font size for a report is specified in the FORM record in System Administration or is calculated based on the various specifications in the FORM record.  The default font size equates to <font size=10> or a scale of 100%.

Bugs:

  1. Field with no widget defined attempts to print formated html text.  Fields with no widget should not print formated html text.
  2. Field with Raw Text widget attempts to print formated html text.  Raw Text widgets should not print formated html text.
  3. SMALL does not work.  There is no noticeable difference in the size of the enclosed text.

Comments:

Read what other users have said about this page or add your own comments.

--  Steve Frizzell - 04 Apr 2008

Edit | Attach | Watch | Print version | History: r21 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 2008-04-14 - SteveFrizzell
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback