Project Printer

Pro and Enterprise Edition only

Document your source code automatically

Project Printer is a document generator. With it, you can quickly accomplish the following tasks.

Project Printer project web site

Advanced options

Project Printer is not just a plain ordinary code printer. Depending on the selected options, you can have a lot of information inserted in the document and get the results in several formats.

How to use Project Printer

First analyze a project fully. Start Project Printer by selecting it from the Pro menu. Project Printer works after analysis phase 1/2, but you get the most out of it after the entire analysis is complete.

Step 1 of 4 - Select files to report

Project Printer step 1

First you select the files to include on your report. You probably usually want to document your entire program and select all files. If you want, you can also create partial documentation by selecting only those files you need.

Click Continue for the next step.



Step 2 of 4 - Report type

Project Printer step 2

You have three report types to choose from:

  1. Full source code. This option documents your entire source code. You get either a source code document or a code web site for surfing.
  2. Comment manual using a special comment syntax. Use this option to generate a manual out of comments in the code.
  3. Comment manual with unformatted comments. This option is similar to the other comment manual option, but this time you do not have to follow any special syntax in your comments. This option extracts comments 'as is' and includes them in the report.


Step 3 of 4 - Output format

Project Printer step 3

The output format selection defines the type of documentation you will get.

When the Automatic target checkbox is selected, Project Printer will automatically select the output directory for you. You can also set the target directory/file by yourself.

The output format you select impacts the options available on page 4/4. Experiment to learn the best format for you.

Step 3/4: Output format
Output format Source code style Comment manual style Hyperlinked Reports Suggested uses
HTML directory Code web site (sample) Web site Yes Yes Document entire system as a web site. Publish on intranet/Internet. Keep as reference. Optionally include reports.
MHT Code web site
(in 1 file)
Web site
(in 1 file)
Yes Yes Document entire system as a web site (single file, multiple pages). Send to your colleagues. Keep as reference. Optionally include reports.
HTML page Code web page Web page document Yes No Send docs to your colleagues. Publish code on intranet/Internet.
PDF Code document Document Yes No Print formatted source code or comments. Send docs to your colleagues. Publish code on intranet/Internet. Include in final project report.
RTF, TXT Code document Document No No Use as basis for writing technical documentation.
Printer Code print-out Print-out No No Print formatted source code or comments.
Display Code document Document No No Quick preview.


Step 4 of 4 - Options

Project Printer step 4

The report type and output options you chose in the previous steps dictate which options are enabled and what the default values are in the 4th step.

Procedure call tree options

Called by, Calls. Check these options to generate a list of incoming and/or outgoing procedure calls in your document after each procedure.

Options for comment reports
  1. All members: Private to Public. Include everything in your reports regardless of scope.
  2. Non-private members only. Skip Private procedures, modules and classes, but include all the rest. This option is useful to document the interfaces visible to other parts of the same project.
  3. Cross-project exposed members only. Document procedures and classes that are visible outside the project itself. Include only Public, Protected and Protected Friend code. This option is useful to document the interfaces available for other projects to call. It is particularly useful for library projects.

These options allow you to leave private implementation details out of your comment manuals. For source code documents, all code is always included regardless of scope. It doesn't usually make sense to document only public procedures, since their functionality is often depends on private ones.

Allow HTML tags in comments. This option allows you to utilize HTML tags for formatting your comment manual. Check this option if you want the tags to have their special meaning, such as <B> for a bold comment. Leave this option unchecked if you want to see the tags as HTML/XML source. Also leave unchecked if you use XML documentation comments (.NET). This option works only for HTML comment manuals, not for HTML source reports.

Options for source code reports

Show problems in code. You can show programming problems inline within the source code. The problems shown are the same as those in the problem view at the bottom of Project Analyzer's main screen. They're included according to the currently selected problem filter. This option is useful for code reviews, for example. You can determine which problems to fix by reading through your code. Or, you may want to check this option for code web sites, so that your colleagues can learn which places need a fix.

Line numbers. This option displays line numbers to the left of the code.

Option for project web site

Create reports. This option includes a set of reports on the site. The reports are based on the entire analysis regardless of which files you have selected in step 1 of 4 above. Tip: Certain reports may fail on very large systems due to out of memory conditions. If Project Printer should fail, run it with this option unselected.

Features of HTML file, HTML directory and MHT

You can configure the appearance of the generated HTML with HTML options and Hypertext options. You can find these dialogs in the Options menu of the Project Analyzer main window.

These HTML/MHT formats produce hyperlinked source code. Each link takes you to the definition of the linked item. If you keep the mouse pointer hovering over a highlighted word or a link, you get some additional information about it. Put your mouse over PicSize in the code snippet below to see this effect.

  15 Dim PicSize As TPicSize  ' Picture size in pixels
  16 Dim MaxColors As Variant ' Maximum number of colors in this picture

HTML directory/MHT project site

The most versatile output formats are the HTML and MHT project sites. You can create a project site for surfing the code (complete with reports) or a Comment manual site as technical documentation. You can even compile the web site as a .chm file.

The appearance of the HTML directory and the MHT file is similar. The difference between these formats is the number of files generated. For MHT it is 1, for HTML directory the number of files may be very large.

HTML directory specifics

HTML directory may generate thousands of files for a medium-sized project. The start page is named index.html. Open it to surf the site.

HTML project site sample

CHM. You can compile the HTML directory site to a single .chm file. You need the free Microsoft HTML Help Workshop for this. A .chm file looks just like the web site, but it offers a search capability, is easy to distribute and takes less disk space. How to compile: When the HTML directory site is complete, see the directory for file report.hhp (HTML Help Project). Double-click the file and compile it in HTML Help Workshop. We have tested this feature with Help Compiler Workshop v4.74. Note: This feature is not designed to generate an end-user help file. It is designed to provide technical documentation for your program.

Miscellaneous

To set the font, use Font options. In HTML and MHT mode, use HTML options. To set the colors of source code, use the dialog Options|Hypertext options.

Project Printer's output appears in the same order the code appears in your files. If you need your code sorted, use a 3rd-party sort utility before running Project Printer.

Why doesn't Project Printer sort the code? Sometimes the readability of code is better in non-alphabetical order. This is especially true if you have written comments between procedures. If you use the Full Module View option in VB6, or you write VB.NET code, you decide by yourself how you wish to order your code. In fact, in VB.NET, this is a necessity, and you can even write variable declarations etc between procedures. That's why we chose not to sort.

See also

Comment manual is a document based on the comments in your code.

Print or export source code. Project Printer is designed for documenting an entire system or a large part of it. Project Analyzer also allows you to print individual files (or shorter code snippets) or export code to syntax-enhanced text files.

©Aivosto Oy - Project Analyzer Help Contents