ASA Carriage Control Resources

asa_to_pdf

The asa_to_pdf(1c) and asa2pdf(1f) programs let you convert ASCII text files using ASA carriage control into properly formatted Adobe PDF files. The programs are functionally equivalent. asa2pdf is written in Fortran, while asa_to_pdf is written in C. The output files are "clear text PDF" files so the output files are easily used with text-based Unix commands. Most modern systems can view, mail and print PDF files.

Note that ASA carriage control is also commonly called Fortran carriage control (FCC).

The default layout assumes a landscape 132-column 60-line format with every other two lines shaded. A good number of switches are available to let you easily print files with no carriage control in portrait mode too, for example. Typically a short script called ascii2pdf, text2pdf, or txt2pdf is set up with your favorite defaults.

The need for asa_to_pdf(1)

The ASA carriage control standard was the first important formatting standard for printing and viewing text files. The standard was almost universally adapted by printer manufacturers of the time (and printers were a much more common output device than interactive displays).

Most commercial high-level programs at the time the standard was created were either FORTRAN or COBOL; so nearly all early FORTRAN output uses ASA carriage control. This FORTRAN/ASA association became so strong that the standard is sometimes referred to as the "Fortran carriage control standard". Indeed, even though ASA is no longer commonly directly supported on desktop printers, it is part of the Fortran 90 standard.

Times have changed, and the now-simplistic ASA standard is poorly supported on Unix and MSWindows machines (OpenVMS is an exception). But no simple alternative has emerged for output files that meet these needs:

HTML and PDF files are the alternatives closest to satisfying this criteria -- yet HTML is not printer-oriented; and PDF files are complex to write from a simple program. So many programs using ASA-based formatting have not been changed. The problem isn't so much with ASA files, but that today's infrastructure does not support the format well. The asa_to_pdf(1) program bridges the gap by allowing you to still make and manipulate ASA files until you want to print or email them, at which time you can quickly convert them to an Adobe PDF file.

alternatives to asa_to_pdf(1)

About the only standard ASA support on Unix variants is that some contain the asa(1)/fpr(1) and nasa(1) commands for converting ASA text files into and from text files with machine control (MC) characters such as form-feed, backspace, carriage-return, .... Most personal printers will not properly print ASA files, but they will correctly print files with simple MC characters. Other Unix commands that can be useful in working with MC character files are expand(1), pg(1), pr(1), "cat -n", "cat -vet" and "col -b" .

Note that the asa(1) command is referenced in the POSIX.2 standard.

Furthermore, if a printer does not directly support MC characters, text conversion utilities such as enscript(1) and a2ps(1) can often be used to print the files (usually by converting the files to PostScript or PCL). Such utilities support features such as titling, page numbering, and other useful options.

Programs like "Adobe Distiller" can convert text to a PDF; as well as editors such as OpenOffice. In fact, most modern document-formatting editors can read in an ASCII text file and save it as an Adobe PDF file.

More extensive flat-text formatting is available using



John. S. Urban, 1996

Asa_to_pdf.c | Home

Contents

ASA description
per IBIBLIO.ORG

asa_to_pdf

1. Description

2. Source

3. Test input
(ASCII text)

4. Test output
(Adobe PDF)