Settings: Footer/Header Tab

Click on the image tabs below to read information about other different configuration options.

 

All the following options are written under the [OPTIONS] section in the HTMLPrint initialization file.
Some of the settings can have only two possible values: 0 (OFF) or 1 (ON).
When a value is shown for any option (in the first column below), it is the default value.
The options can be set either through the above settings window, or by writing directly in the initialization file the corresponding values.

 

The TRIAL version doesn't allow setting the footer text nor its options.

HTMLFooter=

FooterLocation=0

HTMLHeader=

HeaderLocation=0

HTMLFooter2=

FooterLocation2=0

HTMLHeader2=

HeaderLocation2=0

HTMLFooter3=

FooterLocation3=0

HTMLHeader3=

HeaderLocation3=0

Use HEADER and FOOTER to specify the HTML content to be printed.

Both header and footer can be up to 30000 characters long, without any tabs nor line breaks. The full text have to fit in a single line, otherwise the information will not be read properly from the configuration file.

Up to three different HEADERS and FOOTERS can be set. Set the header/footer that goes only in one page (first or last)  as the first and or second one, and the one that goes on all pages as the last one (header3/footer3).

For each page, HTMLPrint first checks if the first header/footer is going to be printed, and only if it is not going to be  printed then checks for the 2nd, and then for the third ones.

FOOTERLOCATION and HEADERLOCATION set where to print the Footer or Header (the number to the left is the value that goes in the configuration file):

0 = Print on all pages

1 = Skip Printing on the first page

2 = Print only on the first page

3 = Print only on the last page

4 = Do not print

5 = Only on even pages

6 = Only on odd pages

7 = Only on even pages excluding the first one

When printing a page range the first and last pages will be the first and last ones in the page range.

 

Some special symbols are used to print page numbering and other special options, they are entered as special tags in the Header/Footer textbox.

  • <!--#C-->: will be replaced with current Document title.

  • <!--#P-->: will be replaced with current Document pathname+filename.

  • <!--#F-->: will be replaced with current Document filename (without path).

  • <!--#D-->: will be replaced with current date.

  • <!--#H-->: will be replaced with current time.

  • <!--#N-->: will be replaced with current page number (numbering always starts from the first page in the document, no matter if the first page is not printed).

  • <!--#NPn: will be replaced with the current page number plus n, which should be an integer whole number.
    Example: If n is 20 and the page number is 1, it will print 21.

  • <!--#T-->: will be replaced with the total number of pages in the current HTML document.

 

If a header or footer is printed, the top or bottom margins may be set accordingly, leaving enough space for the header and/or footer.

The header is positioned so that it's bottom edge is directly above the print job text, between the page edge and the value specified as Print Margin Top.  This is true regardless of the amount of text.  Thus if there is too much text, the early text will disappear off the top of the page.  The user needs to insure that the Print Margin Top is set adequately.  Note that the MarginHeight attribute (<body> tag) can be used to set the spacing at the bottom of the header text, between the header and the document text; values are in pixels.

The footer is positioned so that it's top is directly below the print job text, between the page edge and the value specified as Print Margin Bottom.  In this case, excessive text will flow off the bottom of the page.
The user needs to insure that the Print Margin Bottom is set adequately.  Again, the MarginHeight attribute can be used to control the spacing at the top of the footer,separating the footer from the page text.

 

Note: Some of the symbols shown above can be also used in the document main body, but the page numbering symbols (#N, #NP, and #T) only work inside headers or footers).

 

 

Click the InsertTag button to select which tag you want to use.

Tabs and Returns cannot be used, although if you use HTML files instead writing the text in the Footer/Header Tab you can use them.

If any images is included, its path should be relative to the location of the HTML document being printed.
 

Headers and Footers also can be specified in the command line. Learn More.

Using HTML files as headers/footers:

By including some special tags in the HTML file, HTML files may be printed as headers or footers.

If these tags are used the files referenced by them will be used instead the text entered in the footer/header fields in the headers/footers tab or the footer/header specified in the command line.

In order to include an HTML header, the following code should be present within the HTML file:

 

<!--#header file="filename.htm"-->

 

To include a footer (the trial version doesn't support footers), use the following code:

 

<!--#footer file="filename.htm"-->

 

When using an HTML file as header or footer, any setting in the header or footer section (depending on where is printed the HTML file) will be ignored.
Do not include the #header and #footer tags inside the HTML content specified in the Footer/Header tab.

The other special symbols for showing date, page numbering, etc., can be used.

 

The HTML Footer cannot be set in the TRIAL version.