User Manual for DirectMailTk

Robert Heller

March 8, 2007

Contents

1 Main Window
 1.1 Menu Bar
  1.1.1 File
  1.1.2 Edit
  1.1.3 View
  1.1.4 Options
  1.1.5 Help
 1.2 Toolbar
 1.3 Notebook
  1.3.1 Add Record
  1.3.2 Search and Edit Database
 1.4 Status Bar
2 SelectDatasourceDialog
3 PrintLabelsDialog
 3.1 Label Spec. file
4 Custom Label Dialog
5 ExportEnvDialog
6 ExportLetterDialog
7 ExportCSVDialog

1 Main Window

The main window contains these parts:

1.1 Menu Bar

There are five menus on the menu bar:

  1. File.
  2. Edit.
  3. View.
  4. Options.
  5. Help.

1.1.1 File
The File menu has nine items:

  1. New Not presently implemented.
  2. Initialize DB Initialize the database.
  3. Open... Open A connection to a database.
  4. Save Not presently implemented.
  5. Save As... Not presently implemented.
  6. Export Export rows to various formats.
  7. Print... Print labels.
  8. Close See Exit.
  9. Exit Exit the program.

Initialize DB Initialize the database. This creates a new addresses table. If there is already an addresses table, the initializeation is confirmed.

Open. . . Open A connection to a database. A database connection string dialog is presented to get the information needed to open a database connection.

Export There are three export formats defined:

  1. As CSV... As a Comma Separated Value file.
  2. As LaTeX ENVs As a LaTeX file of envelopes (using the env.sty file).
  3. As LaTeX Letters As a LaTeX Letters file (using the letters class).

As CSV. . . Export to CSV format. A dialog box is displayed giving search options and a place to specify the output file. The output file will have one row (record) per line, with the fields separated by commas. Field values with embeded commas will be enclosed in double quote marks.

As LaTeX ENVs Export to LaTeX Envelope (env.sty) format. A dialog box is displayed giving search options and a place to specify the output file. The selected rows, as selected by the search criteria, are output to a LaTeX file using the env style file as envelope environments. The name of the output LaTeX can be specified.

As LaTeX Letters Export to LaTeX Letter (letter class) format. A dialog box is displayed giving search options and a place to specify the output file and the name of a form letter template file. The form letter template file contains a LaTeX preamble (which in inserted between the \documentclass and \begin{document} lines) and a letter body. The preamble is separated from the body with a line consisting of only:

%%endpreamble%%

The body of the letter can contain these replacement tags:

Print. . . Print Labels

Close See (Exit)

Exit Quit the program

1.1.2 Edit
The edit menu contains the standard edit functions.
1.1.3 View
The View menu is not presently used
1.1.4 Options
The Options menu is not presently used
1.1.5 Help
The Help menu contains the standard help items.

1.2 Toolbar

. The toolbar buttons map to these menu items:


Button GraphicMenu Item




pict File->New


pict File->Open...


pict File->Print...


pict File->Export->As LaTeX ENVs


pict File->Export->As LaTeX Letters


pict File->Export->As LaTeX CSV...


pict File->Exit



1.3 Notebook

The notebook window has at least these two tabs:

  1. Add Record Adds a record (row) to the database. See Section 1.3.1.
  2. Search and Edit Database Searches the database for records to view or edit. See Section 1.3.2.

1.3.1 Add Record
This notebook tab contains the data entry fields to add a new record to the database.
1.3.2 Search and Edit Database
This notebook tab contains a search frame and a list of matching records (rows). The elements on the search results list can be viewed, edited, or deleted. If the element(s) are selected for viewing or editing, additional notebook tabs are creating containing the selected records.

1.4 Status Bar

At the bottom of main window is a status bar, which is used to display help and status messages.

2 SelectDatasourceDialog

This dialog box allows you to select a database backend driver, as well as the name of the database, the database server, the username and password to us to connect to the database, along with any additional connection options needed to connect to this database.

3 PrintLabelsDialog

This dialog box selects label printing parameters and options.

Labels can either be printed to a Postscript printer (or a printer with a Postscript filter, such as Ghostscript) or to a Postscript file.

The format of the labels is determined by the label specification, which can be loaded from a label specification file, using the Browse and Load buttons on the Label Spec. file: line or directly created or edited with the Custom Label Dialog (see Section 4, which can be invoked with the Edit Label Spec. button.

Once the output file or printer has been selected and the label format set up, the rows selected by the search criteria can be printed by clicking on the Print button.

3.1 Label Spec. file

A label specification file is a text file containing lines consisting of key and value pairs:

key: value

Recoginized keys are: LeftMargin, BottomMargin, LabelWidth, LabelHeight, HorizSpace, VertSpace, HorizNumLabels, VertNumLabels, FontName, and FontSize. See Section 4 for a discussion of the values for these keys.

4 Custom Label Dialog

This dialog box allows for customization of label printing.

Label printing is controlled by a label specification, which consists of these values:

LeftMargin
Overall left margin, in points (1/72’s of an inch).
BottomMargin
Overall bottom margin, in points.
LabelWidth
Label width, in points.
LabelHeight
Label height, in points.
HorizSpace
Horizontal space between columns of labels, in points.
VertSpace
Vertical space between rows of labels, in points.
HorizNumLabels
Number of columns of labels on a sheet.
VertNumLabels
Number of rows of labels on a sheet.
FontName
Name of the font to use.
FontSize
Base font size, in points.

5 ExportEnvDialog

This dialog box selects options for LaTeX Envelope exporting. See Section 1.1.1.

6 ExportLetterDialog

This dialog box selects options for LaTeX form letter exporting. See Section 1.1.1.

7 ExportCSVDialog

This dialog box selects options for CSV exporting. See Section 1.1.1.