Microsoft KB Archive/830609

= Incorrect output occurs when printing multiple Help topics from an HTML Help Workshop application =

Article ID: 830609

Article Last Modified on 10/13/2004

-

APPLIES TO


 * Microsoft HTML Help 1.3

-





SYMPTOMS
If you print multiple Help topics from an HTML Help Workshop application, style sheets may not be applied. Also, graphics on the pages may not print. Therefore, the printed output from the printed Help topics may not match the contents of Help topics of the application.



CAUSE
To print multiple Help topics, HTML Help concatenates the BODY sections of each Help topic into one large temporary file. Links to external resources, such as graphics, style sheets, and scripts, may not be present in this file. Therefore, Microsoft Internet Explorer cannot locate these resources when it renders the file and then prints the file.

We have confirmed that HTML Help does not include the MS-ITS protocol for style sheet resources. Therefore, Internet Explorer cannot locate these resources, and Internet Explorer uses the default fonts, the default font sizes, and the default styles instead.



WORKAROUND
To work around this problem, use the MS-ITS protocol when you author the LINK tag or the IMG tag. These tags link an HTML document to style sheets. To do this, use HTML code that is similar to the following HTML code:

For style sheets  For graphics 



STATUS
This behavior is by design.



Steps to reproduce the problem
To reproduce this problem, create an HTML document and a style sheet, create an HTML Help project, and then print multiple help topics.

Create an HTML document and a style sheet
 In Microsoft Windows Explorer, create a folder in the root folder of drive C on your computer. Name the folder Proj1. Create two subfolders in the Proj1 folder. Name these subfolders Htmldir and Cssdir. Start Notepad, and then create a .css file. To do this, follow these steps:   Put the following code in a new Notepad document: /* Style sheet */ body       { color: #000000; background: #FFFFFF; font-size: 70%; font-family: Sans Serif; margin-left: 0em; padding-left: 1.5em; } h1 { font-size: 125%; margin-bottom: .5em; clear:both; width: 85%; } h2 { font-size: 400%; margin-top: 1.5em; margin-bottom: .5em; clear:both; } </li> Save the document as Css1.css in the Cssdir folder.</li></ol> </li> Create an .htm file: <ol style="list-style-type: lower-alpha;">  Put the following code in a new Notepad document: <HTML> <HEAD> <META NAME=&quot;MS-HAID&quot; CONTENT=&quot;a_copyright&quot;> <TITLE>Header1</TITLE> <LINK REL=&quot;stylesheet&quot; MEDIA=&quot;all&quot; TYPE=&quot;text/css&quot; HREF=&quot;/cssdir/css1.css&quot;> </HEAD> <BODY> This is a test file to test the HTML Help file and the style sheets. <H1>Header1 file test text </H1> <H2>Header1 file test text </H2> </BODY> </HTML> </li> Save the document as Header1.htm in the Htmldir folder.</li></ol> </li> Repeat step 4 to create two more .htm files. Name these files Topic1.htm and Topic2.htm. Save these files in the Htmldir folder.</li></ol>

Create an HTML Help project
<ol> Start HTML Help Workshop.</li> On File menu, click New.

The New dialog box appears.</li> In the New dialog box, click Project, and then click OK.

The New Project dialog box appears.</li> In the New Project dialog box, click Next.</li> On the New Project Destination page, type C:\proj1\proj1, and then click Next.</li> On the New Project Existing Files page, click Next.</li> On the New Project Finish page, click Finish.</li> Add files that you created in the &quot;Create an HTML document and a style sheet&quot; section to the project. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the Project tab, click Add/Remove topic files.

The Topic Files dialog box appears.</li> In the Topic Files dialog box, click Add.

The Open dialog box appears.</li> In the Open dialog box, locate and then open the C:\proj1\htmldir folder.</li> <li>Click Header1.htm, Topic1.htm, and Topic2.htm. Click Open.</li> <li>In the Topic Files dialog box, click Add.

The Open dialog box appears.</li> <li>In the Open dialog box, locate and then open the C:\proj1\cssdir folder.</li> <li>In the File name box, type Css1.css, and then click Open.</li> <li>Click OK to close the Topic Files dialog box.</li></ol> </li> <li>On the File menu, click Save Project.</li> <li>Create a table of contents file. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click the Contents tab.

The Table of Contents Not Specified dialog box appears.</li> <li>In the Table of Contents Not Specified dialog box, click to select the Create a new contents file check box, and then click OK.

The Save As dialog box appears.</li> <li>In the Save As dialog box, save the Table of contents.hhc file in the C:\proj1 folder.</li> <li>Right-click in the Contents pane, and then click Insert Heading.

The Table of Contents Entry dialog box appears.</li> <li>In the Table of Contents Entry dialog box, type Header1 in the Entry title text box, and then click Add/Edit.

The Path or URL dialog box appears.</li> <li>In the Path or URL dialog box, click Browse, and then locate the C:\proj1\htmldir folder.</li> <li>Click Header1.htm, and then click Open.</li> <li>In the Path or URL dialog box, click OK. In the Table of Contents Entry dialog box, click OK.</li> <li>Right-click in the Contents pane, and then click Insert Topic.

You receive an HTML Help Workshop message box that contains the following message:

Do you want to insert this entry at the beginning of the table of contents?

</li> <li>In the HTML Help Workshop message box, click No.

The Table of Contents Entry dialog box appears.</li> <li>Repeat steps 10e through 10h to insert the Topic1.htm file and to make Topic1 the Entry title value.</li> <li>Repeat step 10i and step 10j.</li> <li>Repeat steps 10e through 10h to insert the Topic2.htm file and to make Topic2 the Entry title value.</li></ol> </li> <li>Click the Index tab.

The Index Not Specified dialog box appears.

By default, Create a new index file is selected.</li> <li>In the Index Not Specified dialog box, click OK.

The Save As dialog box appears.</li> <li>In the Save As dialog box, save the Index.hhk file in the C:\proj1 folder.</li> <li>On the File menu, click Compile.

The Create a compiled file dialog box appears.</li> <li>In the Create a compiled file dialog box, click Compile.

You receive an HTML Help Workshop message box that contains the following message:

Do you want to save your changes to this project before you compile it?

</li> <li>In the HTML Help Workshop message box, click Yes.</li></ol>

Print multiple Help topics

 * 1) On the View menu, click Compiled File.

The View compiled file dialog box appears.
 * 1) In the View compiled file dialog box, type C:\proj1\proj1.chm in the Compiled file box, and then click View.

The compiled HTML Help (.chm) file appears.
 * 1) On the Contents tab, right-click Header1, and then click Print.

The Print Topics dialog box appears.
 * 1) In the Print Topics dialog box, click to select the Print the selected heading and all subtopics check box, and then click OK.

<div class="references_section">