5 Replies Latest reply on Apr 13, 2009 1:50 PM by psk_rh

    Merged CHM - TOC ok but topic says page cannot be displayed

    psk_rh Level 1
      Developer is able to link to individual topics of a merged chm file... that is he can get the correct topic in the TOC to be highlighted in the left pane. However, the actual topic is not displayed on the right-side pane. Instead, a page cannot be displayed error is displayed on the right-side pane. The only exception is for parent CHM file where linking to a topic opens the correct topic on the right-side pane too without the page cannot be displayed error.

      The merged chm is produced by Robohelp 7. Calling code is in Csharp. And, I made sure there are no '#' symbols in the path. The CHM files are on local machine and they don't have an unblock button as such. I can view them ok individually.

      Code to call from csharp:

      HtmlHelp(this.Handle, <<path to help file>>, HH_DISPLAY_TOC, 1292);

      Any ideas if it needs another line to be added here to actually display the content in addition to the TOC?

        • 1. Re: Merged CHM - TOC ok but topic says page cannot be displayed
          Peter Grainge Adobe Community Professional (Moderator)
          Pete Lees is the guru on this sort of question and he posted this link a while back. Hope it helps.

          http://forums.madcapsoftware.com/viewtopic.php?f=12&t=6463#p35098

          • 2. Re: Merged CHM - TOC ok but topic says page cannot be displayed
            Pete Lees Level 2

            Hi, psk,

             

            At first glance, the syntax of the help call appears to be wrong. If you want to pass a context integer (aka "map number") to the help file then you need to use an HH_HELP_CONTEXT command, like this:

             

            HtmlHelp(this.Handle, <<path to help file>>, HH_HELP_CONTEXT, 1292);

             

            Alternatively, if you want to use an HH_DISPLAY_TOC command, you need to specify the file name of the required topic as one of the parameters. For example:

             

            HtmlHelp(this.Handle, "c:\\TargetHelpFile.chm::/targetTopic.htm", HH_DISPLAY_TOC, NULL);

             

            Pete

            • 3. Re: Merged CHM - TOC ok but topic says page cannot be displayed
              psk_rh Level 1

              Thanks, Pete... I have made some progress but not there yet:

               

              If I use the below mentioned URL, how do I provide the <<path to help file>> for a merged help topic:

              HtmlHelp(this.Handle, <<path to help file>>, HH_HELP_CONTEXT, 1292);

               

              The parent is BPMDocumentation.chm.

              The child project is DesginerUserGuide.chm (besides others.)

               

              To access a topic in the child project, I have tried these in the <<path to help file>>:

               

              BPMDocumentation.chm::/redirect.htm#DesignerUserGuide.chm::/Overview/components.htm

              BPMDocumentation.chm::DesignerUserGuide.chm

              BPMDocumentation.chm::/DesignerUserGuide.chm

               

              However, they do not launch the help file.

               

              The topics in parent can be invoked without a probem.

               

               

              The only way I could lauch child project topic was using this code:

               

               

              HtmlHelp(

              this.Handle, "BPMDocumentation.chm::/redirect.htm#DesignerUserGuide.chm::/Overview/Components.htm", HH_DISPLAY_TOC, 1292);

               

               

              However, the problem with this kind of invoking is that, I cannot move to another topic in the merged help file unless I close the existing instance of the merged CHM file.

               

               

               

              I could get atleast this far thanks to your suggestions here about the redirect.htm:

              http://forums.madcapsoftware.com/viewtopic.php?f=12&t=6463&p=44957

               

              • 4. Re: Merged CHM - TOC ok but topic says page cannot be displayed
                Pete Lees Level 2

                Hi, psk,

                 

                For HH_HELP_CONTEXT commands, I believe that you have two options:

                 

                1. Pass the help calls directly to the child .chm files instead of feeding them through the parent. So, a typical command would look something like this:

                   

                  HtmlHelp(this.Handle, c:\\DesignerUserGuide.chm, HH_HELP_CONTEXT, 1292);

                   

                  Then you would change the project settings of each child help file so that all the other .chm files in the collection are merged into it. This allows the user to view the consolidated index from any child .chm file, and conduct searches across all the files. See the section called "Step 2 - The [MERGE FILES] statement" in this article:

                   

                  http://helpware.net/htmlhelp/how_to_merge.htm

                   

                  In addition, you would change the window properties of each child .chm file so that the TOC displayed is that of the parent. See the section called "Step 3 — Slave Windows Definitions" in the article above.

                2. Channel all context help calls through the parent .chm file, using the techniques described in this article:

                 

                http://helpware.net/htmlhelp/how_to_merge_ctx2.htm

                 

                This requires you to define all the context help mappings for the child files within the parent help file. It's a complicated solution, but it does work.

                 

                As far as the HH_DISPLAY_TOC command is concerned, can you say a little more about the problem you encountered ("I cannot move to another topic in the merged help file unless I close the existing instance of the merged CHM file")? Is this because only the TOC, index and search of the slave .chm file are accessible — in which case the techniques mentioned above should help ("Step 2 - The [MERGE FILES] statement" and "Step 3 — Slave Windows Definitions")?

                 

                If you're willing to send me your parent and child help files, I'd be more than happy to take a look and try to come up with more suggestions.

                 

                Pete

                • 5. Re: Merged CHM - TOC ok but topic says page cannot be displayed
                  psk_rh Level 1

                  Many thanks, Pete.

                   

                  Following step 2 of your instructions solved the problem. Using this mapping process means that it requires regular maintenance work with RH files whenever a new topic and corresponding map ID is created. But atleast it is a solution that works!

                   

                  (There are few other issues that seem to bother me with merged help but they don't obviously fit in this topic. I will raise a different topic for it.)