The Reason my .chm Files were so Large

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
mrsvolunteertoomuch
Propeller Head
Posts: 10
Joined: Wed Sep 26, 2007 1:47 pm

The Reason my .chm Files were so Large

Post by mrsvolunteertoomuch »

With extensive testing, I have found my large file size problem. In my skin that I have associated to my target, I chose to include a Web toolbar on every topic. When I remove the Web tool bar from the skin, my compiled file size changes from 623 KB to 69 KB which in a 30 file merged help system will make a huge difference in the size of the Help files that are delivered to the customer. Unfortunately, the Web help toolbar was adding some functionality that a traditional .chm file does not normally have (unless you do some scripting), but the overhead to use the Web toolbar in HTML Help isn't worth the bloated file size.

Does anyone know of a way to use the Web toolbar in an HTML Help ouput without bloating the .chm file size?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: The Reason my .chm Files were so Large

Post by LTinker68 »

No, although you can possible decrease the size by 1) including only a few icons in the toolbar, 2) using simplistic icons instead of trying to make them look real fancy or 3-D, 3) don't use a gradient background for the toolbar.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
mrsvolunteertoomuch
Propeller Head
Posts: 10
Joined: Wed Sep 26, 2007 1:47 pm

Re: The Reason my .chm Files were so Large

Post by mrsvolunteertoomuch »

No matter what I do to the toolbar, remove gradient, remove icons, change icons, the file size does not change. The only time the file size decreases is if I remove the entrie Web toolbar from the skin.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: The Reason my .chm Files were so Large

Post by LTinker68 »

One other thing to try. This came up in another post, but when you create WebHelp output, Flare will include all of the toolbar icons in the output folder, even if you only select a few icons to actually be in the toolbar. The way to exclude the icons was to go into each icon in the skin editor and set its icon selection to "none". I wonder if doing that will help the HTML Help output that uses the WebHelp toolbar.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
mrsvolunteertoomuch
Propeller Head
Posts: 10
Joined: Wed Sep 26, 2007 1:47 pm

Re: The Reason my .chm Files were so Large

Post by mrsvolunteertoomuch »

So, on the Styles tab in the Skin Editor, do I change the ToolbarItem -- for example the Back icon's ControlType to = not set? The ControlType is the only setting for the toolbar items that is set. The Icon setting is already set to Not Set.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: The Reason my .chm Files were so Large

Post by LTinker68 »

Click on the individual items under ToolbarItem. The items where you can specify an icon have a Basic group. When you expand that and click on the icon fields (Icon, PressedIcon, HoverIcon) there is an option near the top labeled (none). Select that one. That tells it to not use an icon (you'll have to set all three icon fields to none). Leaving it at "not set" tells it to use the default icon, which is the icon that comes with Flare for that toolbar item.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6374
Joined: Mon Mar 05, 2007 8:33 am

Re: The Reason my .chm Files were so Large

Post by NorthEast »

LTinker68 wrote:Click on the individual items under ToolbarItem. The items where you can specify an icon have a Basic group. When you expand that and click on the icon fields (Icon, PressedIcon, HoverIcon) there is an option near the top labeled (none). Select that one. That tells it to not use an icon (you'll have to set all three icon fields to none). Leaving it at "not set" tells it to use the default icon, which is the icon that comes with Flare for that toolbar item.
Actually, that method doesn't work. All it will do is not display the image on the toolbar, it doesn't remove the image from either the skin or the output file.

If you set an icon to (none), it isn't displayed on the toolbar, but the icon file is still included in the output (CHM or WebHelp).
Flare's default icons are located in the Skin\Images folder, and custom icons are in the Data\SkinName folder. You'll still have all the default icons even if you have set your own custom icons.

If you set your own images in your skin, then these icons are included as 'resources' in your skin file (if you look at it in a text editor, you'll see them in the <Resources> section). Flare will generate files for all of these image resources in your output when you build the help, even for images that are not used - i.e. even if you set the item's icon to (none) or a different file, or remove the item from the Toolbar altogether.

If you don't believe me, build the project as WebHelp and check the two skin image folders.


Anyway, the size difference you can expect if you switch on the WebHelp toolbar will be:
- All of Flare's default icons, whether you use them or not = about 170K.
- Plus any icon resources in your skin, whether you use them or not.

Looking at the file size difference in your case, then I'd guess you've got about 350K or more of images in your skin file. If you have a lot of unused icons in there, then I guess you could remove them by deleting the <Resource> line in a text editor - be careful though!
mrsvolunteertoomuch
Propeller Head
Posts: 10
Joined: Wed Sep 26, 2007 1:47 pm

Re: The Reason my .chm Files were so Large

Post by mrsvolunteertoomuch »

Thanks for the information you provided in your last post. I did try all of the things suggested in previous posts with no changes to my file size. However, the information you provided gave me some information I could use to troubleshoot my file. I am finding an image file that was used originally for testing my skin and then we decided to go with a much smaller version of the file. This original image is 390K and it is being included in the Webhelp \Data\SkinName folder where you said I would find any custom images that were used or not. My problem is that I cannot find that image in my project anywhere. I searched my entire hard drive and can only locate this image in my Output folders. When I change the Style for my Toolbar item for my skin, I do see the icon in my drop down list as an available image, but when I look in my project in my Content, File List, or Project view, I do not see the image. Is it embedded somewhere in my skin that I cannot see?
NorthEast
Master Propellus Maximus
Posts: 6374
Joined: Mon Mar 05, 2007 8:33 am

Re: The Reason my .chm Files were so Large

Post by NorthEast »

mrsvolunteertoomuch wrote:Is it embedded somewhere in my skin that I cannot see?
Yes it is - when you use an image in your skin, the image is embedded in the skin file itself as a 'resource'.

To remove the image from the skin:

1. Make a backup copy of your skin file (flskn), just to be safe.
2. Open the skin file in a text editor, e.g. notepad.
3. Look at the bottom of the file and find the <Resources> section - it'll looks something like this:

Code: Select all

<Resources>
      <Resource
        Name="file1.gif">R0lGODlhEAAQANUxACIiIv//...</Resource>
      <Resource
        Name="file2.gif">laNTYlEwnb/PKUDO167LJu1gs...</Resource>
      <Resource
        Name="file3.gif">VDs+QAseQ5eXl9DQ0KHK6ezs...</Resource>
...
</Resources>
Each image in the skin starts with a <Resource Name="filename.xxx"> tag and end with </Resource>. The image data in between these tags may be very long for large images.

4. Delete the line for the image you want to remove, including the start and end <Resource> tags.
Post Reply