Dec 092017
Crams up to 6pages of text onto 1 printed page. Great for listings, and works with any Epson printer.
File CRAMIT.ZIP from The Programmer’s Corner in
Category Printer Utilities
Crams up to 6pages of text onto 1 printed page. Great for listings, and works with any Epson printer.
File Name File Size Zip Size Zip Type
CRAM.C 13001 4509 deflated
CRAM.DOC 8063 3133 deflated
CRAM.EXE 14014 8471 deflated
FILTER.C 615 304 deflated
FILTER.EXE 4150 2483 deflated

Download File CRAMIT.ZIP Here

Contents of the CRAM.DOC file

* ------------------------------------
* C R A M - the ascii file reducer
* ------------------------------------
* CRAM - Ascii File Reducer - V1.0
* Copyright (c) 1988 - Dean Tutterow - All Rights Reserved
* What does it do? It crams as much text as possible onto a page
* in reduced format. Using subscript characters as the font on an
* Epson printer, you can print up to 68 characters wide and 154 rows
* long in 2 columns. That works out to 5-6 pages of text on each
* printed page. In normal use with files with embedded formfeeds
* respected, you get 4 pages of text on each printed page.
* CRAM was written after I had printed another of those LONG
* documentation files. I was tired of those STACKS of listings, etc.,
* that gathered dust simply because they were too much trouble to
* handle once I printed them. Now the printed listings are small
* enough to keep in notebooks. As a bonus, CRAM is especially useful
* for printing program listings. The reduced format is just the thing
* to show program structure and the BIG picture!
* While not limited to Epson printers, it is hardcoded for my FX-86e.
* Of course you can provide your own setup and un-setup codes for your
* printer, and include them in a printer setup file for CRAM to use.
* CRAM tgtfile crammedfile [/options]
* where [/options] are:
* /COLUMN=n with n=1, allow 154 rows of single column text
* /FF if encountered, align to next logical page
* /PAGELENGTH=n may vary printed page length from 1-154 lines
* /RIGHT if /column=1 selected, shifts text to right side
* /SKIP=n number of columns to ignore in tgtfile
* The tgtfile should be a valid DOS filename; wildcards are not
* accepted. You need only supply enough to the option name to
* distinguish it from the other options, for example /C=1 and /R.
* As a daily VAX user, I have tried to implement the straightforward
* command-line interface that VMS afords the user. While the tgtfile
* and crammedfile must be in that order, the options may be spread at
* will along the command line.
* The options are much easier understood after a few practice sessions.
* '/COLUMN=n' is used whenever you must be able to see all the
* characters on each line. While normally defaulted to two-column
* operation, only the first 68 characters on each line (unless some are
* /SKIP-ped) are visible. '/FF' respects embedded formfeeds in the
* text. Normally off, this option moves to the next logical page when
* encountered. The pagelength is adjustable through the '/PAGELENGTH=n'
* option. The is 132 rows, which allows two pages in each column since
* most formatters place 66 lines per page. If you want your one-column
* printing shifted right on the page so that you have whitespace on the
* left side of the page, then '/RIGHT' is just the ticket. Finally,
* '/SKIP=n' ignores the first 'n' characters on each line. This allows
* you to print 68 useful characters in each column when printing
* formatted files with spaces or tabs in the first 'n' columns.

Helpful Hints:

Okay, you have just un-arced one of those shiny new programs
from the bulletin-board and you have this 80,000 byte file
describing all of it's features, called 'SHINY.DOC'. The
first thing to do is scan the file to see it's general format.
The questions to ask yourself are as follows.

"Are there embedded formfeeds?"
If there are then you most likely will want to use
the '/FF' option to align the pages.

"Is there a set page length (usally 66 lines per page)?"
Usually if a documentation file does not have embedded
formfeeds, then it usually has a set page length. While
this is usually 66 lines per page, it could be some
oddball number like 63. For this case you would use the
option '/PAGELENGTH=126' so that two pages will fit in
each column.

"Was the file created with some carriage returns not followed
by line feeds?"
This is the case with document processors that implement
overstrike and other printer features in a generic manner.
They write out a second (and possibly more) line with the
words they want to be overstruck. Since there is no line
feed after the first line, the printer writes over what it
just printed. These type of files make CRAM sick! Never
fear, FILTER is here. Included in this distribution is
the source and executable for FILTER, a program that removes
these subsequent lines from the document so that CRAM can
do it's job properly. FILTER reads from STDIN and writes

"What do I do with documents spaced away from the left side of
the page?"
If 'SHINY.DOC' is formatted so that the first character
on every line starts after some position other than 1,
the '/SKIP=n' option will allow you to ignore those first
'n' characters on every line. When reading lines in,
CRAM converts all tabs to their appropriate space repre-
sentation so need to worry about them either. Using this
option would allow you to see 'n' more characters in your

"I don't have an Epson-compatible printer, am I out of luck?"
For those of you that do not have an Epson-compatible
printer, you may provide your own printer initialization
and termination streams. Simply create a file called
'CRAM.DAT' with two lines. The first line should contain
the binary initialization stream and the second line the
binary termination stream. It is crude but effective.
The printer initialization string sets the line spacing to
15/216 inch, selects superscript mode, and finally selects
condensed mode. The printer termination string returns
the printer to 1/6-inch line spacing, cancels superscript
mode, cancels condensed mode, and finally writes an
end-of-file character.

I can't guarantee it, but I would wager that once you try CRAM
you will use it to print ALL your listings and documentation
files. One nice benefit with printing in condensed superscript
mode is that no matter how bad your printer prints normally or
no matter how bad your ribbon, you WILL get a nice dark, readable
printing. A number of people have even commented that it looks
like it came from a laser printer.

As an advocate of shareware in general and source distribution
in particular, I am distributing CRAM with the stipulation
that NO fee is charged for the use, copying, or distribution
of CRAM. I will gladly accept contributions from those that
find my work of some use to them. Please send any suggestions,
corrections, or contributions to the address given below.

As always, this program is provided AS IS without any warranty,
expressed or implied, including but not limited to fitness for
a particular purpose.


 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>