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
Usage:
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.

-B<number>  
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.

-M<number> 
Specifies the left margin of the page.  The value is set to a default of five (5) spaces.

-P<number>
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.

-L<number>
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
File: Contact.java
Date: Sun Jun 27 10:38:16 1999
________________________________________
1| package rolodex;
2|
3| import java.io.BufferedReader;
4| import java.io.InputStreamReader;
5| import java.io.IOException;
6| import java.io.Serializable;
7|