Copyright: Copyright


Introduction
Introduction:

With this utility you can print any text file on the least amount of paper as possible.  Cram allows the user to print up to four text pages per sheet of paper using MS-Windows True Type fonts and the Print Manager print spooler. This applications supports about every Laser and InkJet printer supported by the MS-Windows 3.1 environment.


What's New in 1.5

If you have used 1.1 the only immediate difference will be the addition of two files (msgblaster.vbx and cram.dll) and a different interface.  The MSGBLASTER.VBX was added to free up the CPU a bit more when Cram is idle.  CRAM.DLL contains the Printer Setup and Choose Font dialogs.  Visual Basic doesn't allow one to retrieve and use specific printer information needed by Cram. Now Cram will not change your printer defaults, keeping  copy in the CRAM.INI for its own use.  One last thing, all of the print routines now implement the Windows API instead of the Visual Basic print routines (i.e., Printer.Print "..."). This gets me one step closer to converting the whole thing to C/C++.


Read This !

This is a full functioning application (but it does require VBRUN300.DLL to run). Nothing has been disabled to persuade you to register. The registered version does remove the About registration banner and the "days unregistered" panel (wait 30 days and you will see what I mean). You will also be given the most recent copy of the program on your favorite media (preferably ftp or e-mail). See below for registration information or print the file REGISTER.FRM included in this .zip.

Registration Form


Getting Started

To get going immediately, start Cram from File Manager or use Run from Program Manager. Open the Setup dialog by clicking on the Setup button and configuring the program to work with your particular printer. If you have a DeskJet, you must enable DeskJet printing option to get the front and back of each page to print properly. The same is true when printing to a HP LaserJet 4L (and other printers that pull the paper from the front of the paper bin, not the back). Else choose  LaserJet series printers for any of the other printers. Make sure all of the other options are disabled for your first print job to get a feel for how the program works. Click on the Save button. Now Open your text file [or you may Drag and Drop a text file(s) from File Manager onto the (minimized) CRAM icon]. The text file will automatically be loaded and processed and the statistics will be displayed. To print the job click on Print. When the first half  is done you will be prompted to print the next side. Wait until the printer has finished printing the first half. Take out the stack and place it back into the paper tray the exact same way it came out (if you have a LaserJet 4, 4L, 4P or similar printer, you MUST turn the stack over,  short edge over short edge so the printed text is facing up). Do not turn the stack around and over. When the stack is in the tray properly, click on the OK button to continue the next side. When the printer is done you will have your document printed with the 1st page (1st two text pages) on top and the 2nd page (next two text pages) on the back side of the same piece of paper.


Purpose

The intended use for Cram is to allow the user to print text files (not word processor documents, which are usually in a binary format) like source code and some shareware documentation (telix.doc is a good example). Of course the Cram documentation cannot be printed with Cram since it is not in a suitable format.  The best way for you to understand what file formats Cram can print, you should know how Cram prints.
First off, please remember that all of this information may or may not be completely correct, but it gives those who know nothing, something. A text file consists of horizontal lines of information, usually ASCII text. In some cases, each line is limited to x number of columns or characters (somewhere between 72 - 80 or so). In other cases, an line of text might not be limited to x number of columns per line, it doesn't contain Carriage Return/Line Feed combinations. Thus each line would be equivalent to a paragraph in a  generic word processor. This generic word processor would be responsible for determining the column width and format the text accordingly (using factors such as page width, font size and style, tab stops, and possibly kerning). Before Cram loads a text file, it determines the page dimensions using the information in the Setup dialog. Cram then loads a line of text, compensates for tab characters, and then chops up the line (if it is longer than the maximum page width) into multiple lines. When Cram is chopping or line wrapping it also attempts to word wrap (forcing whole words to the next line, instead of cutting them in half). Then Cram loads the next line of text from your file, and the above process is repeated. Cram will fit as much text on a line that it can so fewer lines will be needed, and then hopefully fewer sheets of paper. Cram, as mentioned above, is not intended to replace a word processor, if you spent time trying to make your document look good by adding blank lines and indentions, they may not, or most likely will not come out the same when printed with Cram. Later versions of Cram will give the user some more control over how the page is formatted, but what control this may be will be determined by its users and their input.


Using CRAM

Install Cram.exe [and CRAM.HLP, REGISTER.FRM, CRAM.TXT, and SHAREWAR.DOC] into any sub-directory [all other files may be placed into the \WINDOWS\SYSTEM directory or with the other Cram files, these files are the most recent available as of this release but you could be reading this a year from now, so make sure you aren't replacing a newer file to be safe] and then put CRAM into any  Program Manager group or into its own.
When you start CRAM you are given four options; Open, Close, Setup, and About. Open loads the text file you choose and displays  information windows giving statistics about the pending print job. These statistics are dependent on the settings in the Setup dialog. Here you may either Print the text file or Cancel the job and change the setup or exit the program.  The Setup dialog lets you choose how you want the text file to be processed and printed.

Open

Setup

Best Fit

Remove Duplicate Blank Lines

Landscape

Both

Odd & Even

One Side


Best Fit

When this is enabled, the margins are reduced as much as possible to allow as much text to fit on a side of paper as possible. Usually when the point size is 7 or less, you can get 70 or more lines and over 85 columns per page. With large print jobs you can save significant amounts of paper. Please note that some text files are formatted to print with 66 lines per page. If you print with more lines, their page numbering may be offset somewhat.


Fixed Pitch Fonts

This option tells the Font dialog box only to display the fixed width and height fonts that are available for your printer. Use this function if the text file you are printing contains ASCII diagrams and pictures. If you don't use a fixed font in this case the diagram characters will not line up properly.


Remove Duplicate Blank Lines

With this enabled, multiple blank lines will be removed leaving one blank line. Again you must be careful with text files already formatted to be printed "as is" to a printer like documentation for games and utilities.


Font Select

This dialog allows you to select any available printer font and nearly any point size. Keep in mind that this program was designed to conserve paper and ink or toner by printing as many text pages on each piece of paper as possible. Choosing a large point size could cause problems or render the output unreadable. You can choose Bold or Italics and they will be applied.


Pinter Setup
Printer Setup

Here you can change the default printer used by CRAM and its specific Setup to optimize printer output. In some cased it might be beneficial to set print quality to draft, this should speed things up or save ink/toner on the DeskJet or LaserJet 4 printers with econo mode.
If your printer supports duplexing then you would want to enable it since it would be better than simulating it.  The appropriate setting will be changed in order for CRAM to print properly using duplexing.


Spaces Per Tab

If your document contains tab characters (ASCII code 09), this setting will determine the number of spaces between each tab stop. A tab character will push the text line to the next stop.


Landscape

The Landscape option allows you have the output printed horizontally on the page.  This usually reduces the number of lines wrapped, making the page more readable.


Both

This option turns on the simulated duplexing to allow you to print on both sides of each piece of paper.  This would be the opposite of using One Side.


Odd & Even Pages

These options allow you to print what would be an odd page {1,3,5,7...} or an even page {2,4,6,8...}.


One Side

This forces Cram to use only one side of each page.  This comes in handy if you are having problems feeding the first half of the print job back into the printer without getting paper jams.  If you have a duplexing printer, when enabled this option reads Duplex and is set.


Warranty & Registration

This program [CRAM] is being made available on an "as is" basis, and carries no warranties, expressed or implied.  The author shall in no way be held liable for any damages resulting from the use of this program or the media on which it is distributed, including, without limitation, loss of business profits, interruption of business, loss of information, damage to equipment, or any other incidental or consequential damages.

This program is NOT registered for Commercial or Government use beyond a 30 day trial period. After 30 days this program should be registered for $20 a user or $75 for a site license. Individuals may feel free to send whatever they feel the program is worth. Please remember that I am doing this for a living, so if you can afford to pay, please pay. Any suggestions or bugs brought to my attention (ones that I have not been made aware of before) will be rewarded with a registered single user version, and you will be put on my mailing list.

Registration Form


Other Services
Contract Programming & Consulting Services

If you like this application, please contact me for a list of others being developed or already available to the public. If you have need for any particular type of program, please feel free to contact me about contract programming. I have developed applications as simple as screen savers to regional disease propagation simulators to VLSI defect analysis programs. Ranging from Visual Basic for Windows to Unix GNU C with X-Windows library. Since I don't happen to own a Sparc station, I am currently limited to PC applications. Also a full range of consulting services are available for the Bryan/College Station/Houston. Resume available upon request.


Contents
CRAM 1.5

Introduction

Read This !

Getting Started

Purpose

Using CRAM

Warranty & Registration

Other Services

Valued and Contributing Users

Chris Wensel
Real Time Consulting
P.O. Box 2726
College Station, TX  77841

WENSEL@DELPHI.COM

Phone:(409) 268-8285
Fax:(409) 691-2044


Setup Dialog

Font Options:

Printer Options:


Registration Form
                R E G I S T R A T I O N   F O R   C R A M  1.5
                 ----------------------------------------------------------------

       Mail this
       form to:
                Chris Wensel
                Real Time Consulting
                PO Box 2726
                College Station, TX 77841
                Internet: wensel@delphi.com
Compuserve: 74101,1151

       MAKE CHECKS AND MONEY ORDERS OUT TO: Real Time Consulting

       Where did you get this copy of Cram?

       ___________________________________________________________

       What brand and model printer do you use?

       ___________________________________________________________

       Ship to:    _______________________________

                   _______________________________

                   _______________________________

                   _______________________________

                   _______________________________

       Phone:      _______________________________

       Fax:        _______________________________

       Internet:   _______________________________

       qty ordered ____    SINGLE USER REGISTRATION
                           $20 each, postpaid  (Check in US funds)
                           Foreign addresses add $2.00 shipping.
                           No additional shipping charge to Canada.

       qty ordered ____    COMMERCIAL OR GOVERNMENT REGISTRATION
                           $75 each, postpaid  (Check in US funds)
                           Foreign addresses add $5.00 shipping.
                           No additional shipping charge to Canada.


Send Printer Escape Codes

This allows some users to send printer codes directly to the printer.  This is not supported by most printer drivers but some might find it necessary.  The [esc] code is automatically inserted at the beginning of the code. 'E' sends a printer reset command.


Font Options

Font Select

Spaces per Tab

Fixed Pitch Fonts Only


Printer Options

Printer Setup

Choosing a Printer

Send Printer Escape Codes


Choosing a Printer

To choose the correct printer for CRAM to format its output to (when it isn't obvious) you must first determine how the printer pulls paper from the paper bin and places it in the ouput paper tray.  A simple test will determine which printer you should choose. Take a blank piece of paper and place an 'X' on one side. Place this page 'face up' in the paper bin. Now send a small print job to the printer by copying your 'AUTOEXEC.BAT' to the printer port [LPT1 or PRN] or print something out of MS- Windows. Next choose accordingly;

LaserJet:

If the 'X' and printed area are both face down in the output paper tray.

DeskJet:

If the 'X' is on bottom and the printed area on top in the output paper tray.

LaserJet 4 L/P:

If the 'X' is on top and the printed area is on bottom in the output paper tray.

If yours prints differently, please contact me and I will attempt to modify CRAM to support your printer.


Copyright ©
    CRAM

                   Shareware Version 1.5

   Copyright © Chris Wensel 1994-1995

                      All Rights Reserved


Valued and Contributing Users:
Chris Snyder
Michael N. Rubino
Steve Chew
Jake Hamby
Dariusz C. Tatarski


Open Dialog

Use this button to opent the text file(s) you wish to print.  You may also drag and drop the files onto the CRAM minimized icon.  Before printing you are given the current files statistics.

Number of Text Pages

Number of Sheets Used

Number of Columns per Page

Number of Lines per Page

Number of Lines in File

Number of Lines Wrapped

Number of Blank Lines Removed

Spaces per Tab Character


Number of Text Pages

The number of actual text pages the file contains.  There will be four of these to each 	piece of paper if you print front and back.


Number of Sheets Used

This is the actual amount of paper you will use or need to finish the print job.


Number of Columns per Page

The number of characters on each line, depending on the font this might be the average number of characters.


Number of Lines per Page

The number of text lines used for each text page.  Some text pages are formatted to 66 lines a page(the default) but Best Fit determines the maximum number of lines each page can hold depending on the font chosen.


Number of Lines in File

The actual number of text lines in the file. Some lines are longer than the number of columns available and must be wrapped. These wrapped lines are not reflected in this amount.


Number of Lines Wrapped

The number of lines added to the number of lines in the text file that exceeded the column width.


Number of Blank Lines Removed

This is the number of blank lines deleted from the file.  This is only done when the Remove Duplicate Blank Lines option is enabled.


Spaces per Tab

This number reflects the value indicated in the Setup Dialog under Font Options.  It is only displayed on this screen if the file contains Tab characters.