Trying2Learn,
How can I calculate number of pages in a compiled html file, if the file is
fairly large for print outs.
As you've no doubt discovered, most HTML Help files aren't really
designed with printing in mind. A particular issue is that it is only
possible to print the entire contents of a help file in one go if: 1)
every topic in the help file has an entry in the table of contents,
and 2) the table of contents has a single, top-level "book" heading to
which all the other headings and pages are subsidiary.
However, you could give this procedure a try:
1) Right-click a book heading in the Contents pane, and then select
Print from the context menu.
2) Choose the option to print the selected heading and all subtopics,
and then click OK.
3) When the Print dialog box appears, switch to Windows Explorer and
make sure that the option to show hidden files and folders is selected
(Tools > Folder Options > View tab). Don't click Print or Cancel in
the Print dialog box just yet, as this will cause Windows to delete
the file mentioned in step 5 below.
4) Navigate to your Temp directory (\Documents and
Settings\%username%\Local Settings\Temp).
5) Find the file whose name has the pattern "~hh*.htm" (for example,
"~hh5F02.htm"). This is a concatenation of all the topics that you
have chosen to print. The exact name of the file changes with each
print job that you do.
6) Open the file in Internet Explorer and use File > Print Preview to
determine the page count.
7) Repeat steps 1) to 6) for the other heading/subtopics that you want
to print.