LinkExchange Network

This area is for the pursuit of new PC technologies I am interested in. I will khronicle the directions my research takes me, dead ends as well as yellow brick roads, since you can learn much from mistakes.
TECH NOLOGIES
NIQUES

INVESTIGATIONS


Unknown Pundit: "An optimist believes this is the best of all possible worlds. The pessimist sadly agrees."


LAROKE Top
Site Map

Log Index
Previous Investigations Log Entry
Next Investigations Log Entry

Konsultant's Log
Cyberdate 05.31.1997
Abusing WordPerfect to produce an "Electronic" form Part I

INTRODUCTION:

One of my clients, the construction branch of a real estate development company, must fill out a specialized, one-page NOTICE OF COMMENCEMENT form every time construction starts on one of their projects in the city where the majority of their jobs occur. This form is "jam-packed" and difficult to fill out with a typewriter. The client inquired if the form could be "scanned" into WordPerfect so they could fill it out and print it with their PC's.

Normally, I would recommend the purchase of a specialized hardware/software combination for this situation, such as a Visioneer Paperport scanner in combination with Caere OmniForm form software. The problem with that solution is that they didn't want to take on the expense of new hardware, software and training for one form.

I must have been in the mood to "tilt at windmills" (or was that cow-tipping?), 'cause I agreed to tackle the task for a nominal charge. I knew I would have to write-off a substantial portion of my time on this project to "education".

PROGRAM SPECIFICATIONS:

Software: The client had Novell WordPerfect v6.1 for Windows installed on their machines. I would be developing in Corel WordPerfect v7.0 for Windows 95 and, (hopefully) converting the finished form template back to v6.1 (one of the other machines in my office has WordPerfect v6.1 installed).

Fonts: Arial to match the "Helvetica" font of the original form and "Courier New" for the fields that would be filled-in to give an appearance similar to that a typewriter might make. These fonts were chosen because they are default fonts installed on standard Windows systems.

Printer: The client's printer is a Hewlett-Packard HP 4L Laserprinter. We also have one at my office so testing the final template would not be a problem.

Form: Single page, 8-1/2" x 11", black on white form (depicted below).

Notice of Commencement Form 1

INITIAL EXPERIMENTS:

If I recorded step-by-step all the dead-ends I've explored during this little exercise, this one installment would turn into a novelette length story. I had to restart or backtrack several times due to my incomplete knowledge of WordPerfect "features". Instead we will proceed to build a form from the beginning without mistakes. The places in the procedure where I stepped on my own.. uh.. foot will be described briefly, to save you from the same kruel fate.

FORM CREATION:

STEP 1: Set Printer Before opening WordPerfect, The HP 4L was made the default printer in the Windows 95 printer folder. This is done because changing printers after the form is complete can produce unpredictable (and almost always undesired) formatting results.

STEP 2: Format Document Under the "Format" menu, choose "Page", then "Page Size" to open the Page Size Dialog. Pick "Letter" under the "Page Definition Name" Picklist to set the form's page to a standard 8-1/2 x 11 inch sheet in "Portrait" orientation.

Under the Format menu again, choose "Document", then "Initial Font" to open the Document Initial Font dialog. Using the dialog, Arial Regular 6pt is setup as the initial font. Now, as some of you may realize, this is really small print. There are only two places in the form where this small font will be used: the captions below the two text boxes. The caption text seems to default to the Initial Document Font, and I have yet to find a way to change this in WordPerfect.

Now, once again under the Format menu, choose "Margins" to open the Margins dialog and set the "Left", "Right", "Top" and "Bottom" margins at 0.250, 0.250, 0.300 and 0.300 inches, respectively. Some printers will not allow margins under 1/2" but the HP 4L does not have a problem with printing almost to the edge of the paper.

It's time to name and save the form. In this example, the form is named "Notice1.wpd" and saved in WordPerfect 6.0/6.1 format to match the client's version of WordPerfect.

STEP 3: Place Text Boxes A simplified explanation of how WordPerfect works is in order at this point. If you can grasp, in general, how a program works, it usually helps you to make applications do what you want them to do with a lot less pain. A WordPerfect document is composed of the text and graphics that are to be displayed (content) and the formatting instructions (codes) that determine how the content is displayed and printed. The codes are interspersed within the text, but are generally not visible to the user. In general, formatting codes affect the text and graphics that "follow" the codes. In the example WordPerfect partial screen shot below, the text is shown as it will appear in the printed document at the top (black on white) while the text along with the formatting codes is shown in gray at the bottom:

Partial WordPerfect Screenshot 1

For you WordPerfect experts "What's wrong with this picture?" For the rest of you, the above codes are as follows: [Open Style: Initial Style] the opening style of the document is the document's default initial style. [Lft Mar] indicates a relocated left margin (the dotted blue line). [Font: Balloon] is a font change from the document's initial default font. [Font Size: 14pt] likewise, is a change in font size. [HRt] is the code for a hard carriage return. Now, finally, some "content" text with the spaces between the words indicated as "diamonds". [HRt][HRt] two more carriage returns. [Font: Courier New] indicates a font change again and [Dropcap Definition] is for a big initial character like monks use for illustrated manuscripts. There's no big initial character, you say? You're right, I doctored the screen shot to test the WordPerfect experts. the "1" in the bottom "14" should be a dropcap. Last, but not least, is the remaining content text in this example, again with diamonds for spaces. The red rectangle at the end marks the curser location at the time of the screen shot. It is neither code nor content.

Are we havin' fun yet? The point to remember is that a formatting code formats content that comes after it, unlike drivers in Italy, I'm told, who don't care what is behind them =^)

Where were we? Oh yeh, Step 3: Text Box Placement. The reason for all that formatting code stuff is so you'll understand why we are putting the Text Boxes in now, instead of later. Since all the content has to "wrap around" these two boxes, we have to define them at the beginning of the form so the content that follows will "know" where they are.

Let's place the first text box in the upper right-hand corner of the form. From the "Graphics" menu, "Text Box" is chosen which, in WordPerfect v7, places a default box on the page at the cursor location. In this example since we haven't typed any content text yet, the box should be at the upper left-hand corner hugging the top and left margins we previously set. Clicking on the text box to pick it and then right-clicking and choosing "Edit Box" from the Context-sensitive menu brings up the Edit Box dialog as shown below:

Partial WordPerfect Screenshot 2

Clicking the "Border" button which currently defaults to "none", displays a grid of "Thumbnail" choices from which we pick the single-line box icon. This gives us a Text Box with a thin line around all four sides.

Leaving the "Fill" button alone and clicking on the "Wrap Text" button (currently defaulting to "No Wrap (Through)" gives us a list of Thumbnails from which we choose "Square/Both Sides". This will cause content text that we type in after this Text Box Definition to stop when it encounters the edge of the Text Box and "wrap" to the next line.

We can see that the Text Box is Attached or Anchored to the "Page" which is just what we want, except that it is currently in the wrong "Position". Clicking on the "Position" button produces a Position dialog where we specify that the Text Box is to be located "Horizontal" zero inches from the "Right Margin" and "Vertical" zero inches from the "Top Margin". This puts it in the upper right-hand corner where we want it.

Let's skip "Box Style" which is already defaulting to Text Box, and "Caption" which we will come back to in a moment, and "Content" which we don't need to fill since the box is to be left blank on the finished form.

Clicking on the "Size" button pulls up a "Box Size" dialog where we "Set" the "Width" and "Height" at 2.50 and 2.50 inches, both. We will fine-tune the box size later, but right now, it's "good enuf for gover'mint work".

Finally, back to the "Caption" button. Clicking it and choosing "Bottom", "Outside Border" and "Center" buttons for "Caption Position" places the Caption correctly. Clicking the "Edit" button allows us to fill in the Caption text which defaults to the Arial Regular 6pt Initial Document Font as mentioned back near the beginning of this article.

The other Text Box is placed right after the first one using the same process. All the settings for the second text box are the same except for position and size. The second Text Box is placed in the lower right-hand corner of the page, and is initially sized at 3.50 inches wide by 4.00 inches high. So far our form looks like this:

Notice of Commencement Form 2

KONCLUSIONS:

Whew! As you can see we've barely started, and this is turning into a multi-part article. When we come back next time, we'll start wrestlin' with the form text and line graphics. Keep yore powder dry 'til then.


LAROKE Top
Site Map

Log Index
Previous Investigations Log Entry
Next Investigations Log Entry

LAROKE Microcomputer Consultants
155 East Boca Raton Road
Boca Raton, Florida 33432
(561)368-0659 (Tel & Fax)

Issued Saturday, May 31, 1997

Updated Saturday, August 30, 1997

copyright © 1997 LAROKE Microcomputer Consultants all rights reserved