Publication - CHM file: Imbedded files

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Publication - CHM file: Imbedded files

Unread post by Erich Carshagen »

Good day,

I have upgraded to 8.4 and when publishing the help file with imbedded files using mk:@MSITStore:paxus.chm::/filename, I receive the following error:

The link "mk:@MSITStore:paxus.chm::/filename.pdf" in topic topicname is missing a protocol prefix ("http://"). This link might not work. [View topic]

The link works fine and adding the http:// to the mk:@MSITStore fails open file, but where I remove the http://, the file is opened as expected. Has something changed for imbedded files in a CHM file, or is this a false error?

Thank you
Erich
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Publication - CHM file: Imbedded files

Unread post by Tim Green »

Hi Erich,

The warning about a missing http prefix can be ignored for ms-its and mk:@MSITStore links. It is just a check for regular web links, which have different requirements. Note also that there is no longer any difference between the behavior of ms-its and mk:@MSITStore links in CHM if you enter them in the link tool. They will both only work if you choose "Same as referring topic" as the target window, and they will both open an embedded PDF inside the CHM file.

However, it is now actually much easier to link to an embedded PDF from within a CHM. Just choose the Internet Link option and enter the name of the PDF file and nothing else, and set the target to New Window. Help+Manual will then automatically create the necessary link to the PDF in the CHM file, including the entire absolute path to the CHM file necessary to make the link work. For example, in my test output the link that gets created looks like this:

Code: Select all

mk:@MSITStore:C:\Users\tg\Documents\My%20HelpAndManual%20Projects\Demohelp\NewProject.chm::/NewProject.pdf
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.
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Re: Publication - CHM file: Imbedded files

Unread post by Erich Carshagen »

Hi Tim,

Thank you for the below. The only issue is that we have over 300 imbedded files. This means that other issues may be missed due to the sheer number of expected errors for this. Is there something that we can do to prevent this or remove these errors short from removing the files?

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

Re: Publication - CHM file: Imbedded files

Unread post by Tim Green »

Erich Carshagen wrote: Thu Sep 09, 2021 9:51 am The only issue is that we have over 300 imbedded files.

In a single CHM file?!?!? Wow. :shock: That is very brave. I'm surprised that anyone anywhere is able to even open the CHM file, let alone actually view the documentation in it. That is too many embedded files by a factor of 100. They should really be stored as separate files in the same folder as the CHM file. Then link to them with a regular Internet link with new window as the target, and they will open in the PDF reader app.
This means that other issues may be missed due to the sheer number of expected errors for this. Is there something that we can do to prevent this or remove these errors short from removing the files?
There is nothing in the new version that has anything to do with this. The message about the http protocol prefix is only information, which was added for regular web links because so many people get dead links to other pages because they forget it. Nothing has changed in the actual formatting of the links or the behavior of CHM files. So if your links have been working up to now they should still work.
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.
Erich Carshagen
Posts: 35
Joined: Mon Feb 13, 2017 4:25 pm

Re: Publication - CHM file: Imbedded files

Unread post by Erich Carshagen »

Hi Tim,

Yes, over 300. Templates and example files. I will play around with the suggestion of the link to the document instead of imbedding the file to see if this will change how we publish to clients.

Thanks for the help!
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Publication - CHM file: Imbedded files

Unread post by Tim Green »

Hi Erich,

Note that it's quite easy to change references like this globally if you work directly on the topic XML files with a multi-file editor like Notepad++. You need to save the project in the uncompressed XML format (second save option under Save As... in the File menu, uncompressed XML/HMXP). Then you can perform a multi-file search and replace with regular expressions directly on the XML source. You can get the before and after code directly in the HM topic editor by looking in the XML tab on a sample link before and after changing it. 8)
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.
Post Reply