2 Replies Latest reply on Sep 27, 2006 7:56 AM by Spotuser

    Autosize images in RoboHelp?


      We are translating an english RH project to german now, and since I'm about to produce german versions of the included screenshots/images, I've come across a bit of a problem. Maybe someone can help.

      When placing an image in a RoboHelp X5 topic, the HTML code by default specifies the exact pixel size of the image. See example below:

      <p class=Base><img src="../images/dxp_user_interface.png"
      style="border: none;
      width: 465px;
      height: 356px;
      float: none;
      border-style: none;
      border-style: none;"

      What I want to do is just replace the english original image with a german image using the identical filename. However, the exact pixel size may vary somewhat from the english original.

      When building a CHM from RoboHelp, this new image will be rescaled to the exact pixel size specified in the HTML. This causes the image to look bad.

      Now, in RoboHelp I can double-click on each image, click on the Size button, and uncheck the "Preferred width" and "Preferred height" check boxes. This causes the german image to return to its real pixel size without being rescaled.
      However! This does not mean that the HTML code removes the information about exact pixel size (which is what I would like), it instead just replaces the pixel-information with the exact values of the new german image.

      So, I don't wanna double-click on my 400 images and manually fix them each time we do a translation.


      a) Is there a way to make RoboHelp NOT write down the pixelsize in the HTML code, but rather let each image just appear like it is?

      b) Is there a way to automatize or somehow make all my german images not rescale, without going through my entire project and double-clicking on each image?
      I tried to investigate editing the HTML and removing the width/height statements in hope of running a script to do this for all HTML pages, but I got scary results as RoboHelp tried to fix itself automagically and things got real wacky. Odd bits of code appeared in the RoboHelp truecode, like RH didn't like me messing with the HTML code on my own.
        • 1. Re: Autosize images in RoboHelp?
          RoboWizard Level 4
          Hi Spotuser

          Hopefully you are aware there is a much better way to resize the image back to the correct dimensions. You simply right click and select Reset size via the resulting context menu.

          However, I do understand your need for doing this somewhat en masse. So before doing anything else, I'd first strongly suggest you submit an enhancement request at the link below:
          Click here to visit the wish form

          Now that you have done that, you might find another piece of software to be useful. Fellow Microsoft Help MVP Rob Chandler offers a nifty product that should find a home in every technical author's toolbox. It's called FAR (Find and Replace) and does a marvelous job of such things. There is even a free trial offered. To get your own copy of the trial, visit the link below:
          Click here

          Hopefully this helps... Rick
          • 2. Re: Autosize images in RoboHelp?
            Spotuser Level 1
            Thanks for the reply!

            I did not know about the "Reset Size" context menu option, that is a bit easier than the doubleclick.

            I did some more investigation of hacking the HTML outside of RoboHelp and found that by removing the width and height statements from the image tag, I could replace files as I wanted and they got their correct size.

            <p class=Base><img src="../images/dxp_user_interface.png"
            style="border: none;
            float: none;
            border-style: none;
            border-style: none;"

            This means that in theory, I could:
            1. Close RoboHelp
            2. Run a script that removes these parameters.
            3. Replace all the imagefiles on my harddisk with german ones.
            4. Open the RoboHelp project.
            5. Build a correct german CHM.

            However, as soon as I make a tiny change to a topic, RoboHelp will write down the image pixel size in that topic to the TrueCode/HTML.

            So it's a pretty shaky procedure, nothing you'd wanna do on a daily basis.

            I submitted a Feature Request as you suggested, that they should add a setting in RH that does not specify pixel sizes in the HTML but rather lets every image appeas "as is".

            Thanks again!