Printable Code Format

Printable Code Format

Report:  Printable Source Code Format
Option:  -p
Supplemental Options:
-B1         Begin Top Margin Line Spacing
-M5         Left Margin Character Spacing
-P55        Page Length in Lines
-L80        Line Length in Characters
-S"string"  Header String for all reports
Compatible Options: RSM Option Cross Reference
rsm -H -p *.h *.cpp > report.htm
rsm -H -O"report.htm" -B5 -M5 -P60 -L80 -p *.java 
Source:  C, C++, C# and Java
The -p mode will take your source code and format it for printing.   The format provides a header for each file with the file name, date and size.   Each line in the source code is numbered with a line number.  This type of format is amenable to code peer reviews.

Specifies the top margin of the page.  This value is set to a default of one (1) line.  You will have to perform trial and error with your printer to get the output to be centered on the page.

Specifies the left margin of the page.  The value is set to a default of five (5) spaces.

The page length is set to a default of 55 lines.  There also is a configuration file option for a page break after each source code page.  This option is set by default to no page break so that Visual Studio and Web Browsers can correctly paginate the the source code output.

The line length is the printable line length.  This length includes the space required to display the line numbers  ( 6 spaces), however the line length must fit on the printed line length.

-S"string in quotes" 
A header string can be specified so that a formatted header is presented on top of each file.  This header is user specified and can represent the company or a project name.  The header string must be delimited with quotation marks. Provides a report title for all reports regardless of using -p

Acme Software Systems
Date: Sun Jun 27 10:38:16 1999
1| package rolodex;
3| import;
4| import;
5| import;
6| import;