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. A RAW TEXT widget type can be used to print the unformated field value including any html tags.

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

<HTML>...</HTML>

The HTML element contains the entire html document.  A field whose contents is to be formated by embedded html tags must begin with an HTML element starting in position 1. The end tag of an HTML element is optional.

Generic Block Level Elements:

CENTER - Centered block

<CENTER>...</CENTER> 

Text within a CENTER block is formated and then centered horizontally within the width of the output widget.

H1 - Level-one heading

<H1>...</H1>

The H1 element defines a level-one heading.  The level-one heading is the highest level heading and has the largest and boldest font size of the six possible heading levels.  A document generally has a single level-one heading representing the most important heading level.

H2 - Level-two heading

<H2>...</H2>

The H2 element defines a level-two heading.  A level-two heading is less important than a level-one heading and more important than a level-three heading.  The font size of a level-two heading is smaller than a level-one heading and larger than a level-three heading.

H3 - Level-three heading

<H3>...</H3>

The H3 element defines a level-three heading.  A level-three heading is less important than a level-two heading and more important than a level-four heading.  The font size of a level-three heading is smaller than a level-two heading and larger than a level-four heading.

H4 - Level-four heading

<H4>...</H4>

The H4 element defines a level-four heading.  A level-four heading is less important than a level-three heading and more important than a level-five heading.  The font size of a level-four heading is smaller than a level-three heading and larger than a level-five heading.

H5 - Level-five heading

<H5>...</H5>

The H5 element defines a level-five heading.  A level-five heading is less important than a level-four heading and more important than a level-six heading.  The font size of a level-five heading is smaller than a level-four heading and larger than a level-six heading.

H6 - Level-six heading

<H6>...</H6>

The H6 element defines a level-six heading.  A level-six heading is less important than a level-five heading. A level-six heading is the least important of the six headings.

P - Paragraph

<P>...</P>

The P element defines a paragraph.  The closing tag for a P element is optional.  A P element cannot include other block-level elements such as CENTER, PRE, or H1 thru H6.

PRE - Preformated text

<PRE>...</PRE>

The PRE element is used to print preformated text.  Preformated text is printed with a fixed space font.  White space is not compressed out and long lines are not wrapped.

Special Inline Elements:

A - Anchor

<A HREF=uri>...</A>

The A element is an anchor for a hypertext link that is to be embedded in the pdf document.  The HREF attribute specifies a hypertext link to a web page, an image, or other types of files.

Example: <A HREF="http://www.appx.com">the APPX web site</A>

BR - Line break

<BR>

The BR element forces a break in the current line.  Printing of text continues on the next line.

FONT - Font change

SUB - Subscript

<SUB>...</SUB>

The SUB element print the text within the block as a subscript.

SUP - Superscript

<SUP>...</SUP>

The SUP element print the text within the block as a 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

Details:

Font Size

APPX output processes support 28 font sizes relative to the default font size of the report.

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 inner 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. 

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

The default font size for a report is specified (as a point size) 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 font scale of 100%. The following table shows that APPX supports 28 font sizes that are all scaled relative to the default font size of the report.

HTML Font Size APPX Font Scale
 1  25%
 2  33%
 3  50% 
 4  66%
 5  75%
 6  80%
 7  85%
 8  90%
 9  95%
 10  100%
 11  105%
 12  110%
 13  115%
 14  120%
 15  125%
 16  130%
 17  140%
 18  150%
 19  175%
 20  200%
 21  300%
 22  400%
 23  500%
 24  600%
 25  700%
 26  800%
 27  900%
 28  1000%

Font Color

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

font color=name is not supported.

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.

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 | r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r10 - 2008-04-15 - KorryDouglas
 
  • 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