Using Hydrobase toPrint E-19s in OB81/82
Office of Hydrologic Development

03/15/2007

Modified 04/16/2008

New/Changed Features in OB81/82:

1. The document no longer includes any escape sequences for HP printers.

2. The document now contains form feed characters embedded in the document to specify new page feeds.

3. There is a new token named “whfs_lines_per_page” to control the number of lines per page. The default value for this is 60. This explicit number is needed because every page has footer, and the report generation component uses this value to know how many blank lines to insert once the page's text body is complete.

Instructions for Printing:

There are two basic methods for printing these reports, depending on whether you use the HydroBase application to directly print the file or whether you save the file to disk and then print it using commands issued external from HydroBase. Each method is discussed below.

  1. Direct Printing for HydroBase

1)Adjust the following tokens in your /awips/hydroapps/.Apps_defaults_site file:

  1. Set the token “whfs_e19_print_command” to:
    “lp –d(printer) –o cpi=19 –o lpi=7”
  1. Two things to keep in mind with respect to the above token setting:
    1. The token value should include the open/close quotes
    2. The parenthetical printer should be replaced with an actual printer
    value, eg lp1 for the black printer or lp2 for color.
    “cpi” is characters per inch and “lpi” is lines per inch. In this example, the document would have 19 characters per horizontal inch and 7 lines per vertical inch. These options adjust how much data would fit inside a page.

You may need to play with the cpi and lpi valuesto get it exactly as you want it.
Note that this token does not alter the settings for other text reports such as “e19a”.

  1. Set the token “whfs_lines_per_page” to 60.

2)Start the HydroBase application.

3)Select a location from the main Hydrobase window, and from the Hydrobase Reports menu, select the Text Reports option. An E-19 report will come up.

4)Use the ‘print’ button on the text report GUI to print the document.

B. Printing File Saved from HydroBase

Repeat steps A.2 and A.3.

1) Select the ‘save’ button to save this report to a text file, instead of selecting the print button. The default directory location is defined as “/awips/hydroapps/whfs/local/data/reports”, as controlled by the token “whfs_report_dir”. The default file name is: “stationID.e19”.
The blank lines inserted by the program may result in it still being properly form-feeding for even those pages that are missing the form feed.
2) If there are page break problem after issuing the print command given below, edit the file and copy the <np> (i.e. form feed) character to follow the footer for the three pages missing the form feed.
Also, the font size implied by the options in the below step accounts for the “widest” page, which can contain around 130 characters. This results in a font size that is small for that majority of pages which only use around 80 characters per line. The user may wish to adjust the font size in either an editor or word processor to account for these page “width” differences.

3)From the terminal, issue the command:
lpr “stationXXX.e19–o cpi=19 –o lpi=7”

If there are problems with the line word wrap or the page breaks, it will be necessary to adjust one or more of the following: cpi and/or lpi value in print command, whfs_lines_per_page token value. The margins defined for the document may also play a role in controlling the page breaks and the word wrap.

1