Incorrect output occurs when printing multiple Help topics from an HTML Help Workshop application (830609)



The information in this article 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
<LINK REL="stylesheet" MEDIA="all" TYPE="text/css" HREF="ms-its:proj1.chm::/cssdir/css1.css">
For graphics
<img src="ms-its:proj1.chm::/files/image.jpg">

STATUS

This behavior is by design.

MORE INFORMATION

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

  1. In Microsoft Windows Explorer, create a folder in the root folder of drive C on your computer. Name the folder Proj1.
  2. Create two subfolders in the Proj1 folder. Name these subfolders Htmldir and Cssdir.
  3. Start Notepad, and then create a .css file. To do this, follow these steps:
    1. 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; }
    2. Save the document as Css1.css in the Cssdir folder.
  4. Create an .htm file:
    1. Put the following code in a new Notepad document:
      <HTML>
      <HEAD> 
      <META NAME="MS-HAID" CONTENT="a_copyright"> 
      <TITLE>Header1</TITLE>
      <LINK REL="stylesheet" MEDIA="all" TYPE="text/css" HREF="/cssdir/css1.css">
      </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>
    2. Save the document as Header1.htm in the Htmldir folder.
  5. Repeat step 4 to create two more .htm files. Name these files Topic1.htm and Topic2.htm. Save these files in the Htmldir folder.

Create an HTML Help project

  1. Start HTML Help Workshop.
  2. On File menu, click New.

    The New dialog box appears.
  3. In the New dialog box, click Project, and then click OK.

    The New Project dialog box appears.
  4. In the New Project dialog box, click Next.
  5. On the New Project Destination page, type C:\proj1\proj1, and then click Next.
  6. On the New Project Existing Files page, click Next.
  7. On the New Project Finish page, click Finish.
  8. Add files that you created in the "Create an HTML document and a style sheet" section to the project. To do this, follow these steps:
    1. On the Project tab, click Add/Remove topic files.

      The Topic Files dialog box appears.
    2. In the Topic Files dialog box, click Add.

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

      The Open dialog box appears.
    6. In the Open dialog box, locate and then open the C:\proj1\cssdir folder.
    7. In the File name box, type Css1.css, and then click Open.
    8. Click OK to close the Topic Files dialog box.
  9. On the File menu, click Save Project.
  10. Create a table of contents file. To do this, follow these steps:
    1. Click the Contents tab.

      The Table of Contents Not Specified dialog box appears.
    2. 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.
    3. In the Save As dialog box, save the Table of contents.hhc file in the C:\proj1 folder.
    4. Right-click in the Contents pane, and then click Insert Heading.

      The Table of Contents Entry dialog box appears.
    5. 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.
    6. In the Path or URL dialog box, click Browse, and then locate the C:\proj1\htmldir folder.
    7. Click Header1.htm, and then click Open.
    8. In the Path or URL dialog box, click OK. In the Table of Contents Entry dialog box, click OK.
    9. 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?
    10. In the HTML Help Workshop message box, click No.

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

    The Index Not Specified dialog box appears.

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

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

    The Create a compiled file dialog box appears.
  15. 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?
  16. In the HTML Help Workshop message box, click Yes.

Print multiple Help topics

  1. On the View menu, click Compiled File.

    The View compiled file dialog box appears.
  2. 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.
  3. On the Contents tab, right-click Header1, and then click Print.

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

REFERENCES

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

235226 HTML Help URL protocols


Modification Type:MinorLast Reviewed:10/13/2004
Keywords:kbtshoot kbprint kbhelpfile kbprb KB830609 kbAudDeveloper