Printing

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
matthewj
Posts: 68
Joined: Tue Jan 11, 2005 9:14 pm

Printing

Unread post by matthewj »

I note that printing the help pages gives poor results. Is this specific to your pages, or generic. I tried to print the "converting HM3 projects" (3 pages total) and it moves most of the items to the second page, and then doesn't print any more. I've seen this on web pages where they had tables, but never really understood it. Obviously we provide PDF too, but I'd like to know that printing a single help page will work well before I convert my projects.

(I upgraded to Pro already, don't know if that makes a difference).

Matthew
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Matthew,

You don't say what format you are using (H&M currently supports seven) but I assume it is HTML Help. This is simply a restriction of the HTML Help viewer -- its printing capabilities are lousy and always have been. If you are getting more tables bumped onto next pages that is probably because in H&M 4 you can use bigger tables that can split at page breaks in PDF. When you print from the HTML Help viewer the tables can't split -- this is a problem with the Microsoft viewer and has nothing to do with H&M.

The bottom line on this one is simply don't try to print from the HTML Help viewer...
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
matthewj
Posts: 68
Joined: Tue Jan 11, 2005 9:14 pm

Unread post by matthewj »

I was going to say I never had this problem with the H&M 3 CHM's (and I am using the ones supplied with the product as examples) but I just tested it and see that it does indeed have the same problem so isn't new to H&M4. Okay, never mind!

I don't think it is "table" based though - no page goes over the second page. If this is beause the whole page is in a table, is that really needed?

Matthew
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Matthew,

A table is used around the topic text in the standard template because this is the best way to avoid a problem enountered in HTML Help called the "horizontal scrollbar bug". If you use a DIV tag instead what happens is that under certain circumstances tables used as layout elements can be interpreted as having a width of greater than 100%, which results in pages that annoyingly always extend slightly beyond the right margin of the viewer window, activating the horizontal scrollbar.

I've actually used a DIV tag instead of the standard table in the H&M4 help (see below). You can do this if you remember to always make sure that tables filling the entire width of the page are set to "Autosize" and not to "100%" or "Page Width". If you don't set to Autosize and your tables contain paragraphs with hanging indents (and other formats that are interpreted as tables) you will encounter the horizontal scrollbar bug.

To use a DIV tag instead of a table go to Project > Project Properties > HTML Help > Topic Pages and select "Let me edit the HTML code directly". (Note that the topic page templates are also available in the Browser-based Help and Visual Studio Help sections but they are always the same template.)

Select the template for the Main windows type (and afterwards also for any other window types you have defined) and locate the following code:

Code: Select all

<!-- Placeholder for topic body. -->
<table width="100%" border="0" cellspacing="0" cellpadding="5"><tr valign="top"><td align="left">
<%TOPIC_TEXT%>
</td></tr></table>
Replace it with this:

Code: Select all

<div style="margin: 5px 5px 12px 10px;">
<%TOPIC_TEXT%>
</div>
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

PS: The advantage of using a DIV tag instead of a table, in addition to solving the page break problem, is that it keeps paragraph text within the viewer window even if graphics on the page extend beyond the right margin. If there is a table around the entire page all the text always extends to the right margin of the enclosing table, and if the page contains wider graphics you must also scroll to the right to be able to read the text...
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
matthewj
Posts: 68
Joined: Tue Jan 11, 2005 9:14 pm

Unread post by matthewj »

Thanks - I'll go experiment just as soon as I finish shipping the code I'm working on!

Matthew
Post Reply