Flare 7 issue with image size using percent value

This forum is for all Flare issues not related to any of the other categories.
Post Reply
nsemple
Propeller Head
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am

Flare 7 issue with image size using percent value

Post by nsemple »

In Flare 6 I was able to insert a reference to images inside a div tag such that the width of the image was based on a percent of the div width and the image height was set to automatic ( <img src="myimage.jpg" style="width: 80%;height: auto;"/>).

This code worked just fine in Flare 6. I now have Flare 7 and this code no longer works. The view of the images in the XML editor are messed up and when the topics are compiled, the images are missing.

For some reason, Flare 7 is not interpreting the code the way that Flare 6 did. Anyone have an idea why?
(Yes, I have submitted a bug.)
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Flare 7 issue with image size using percent value

Post by Nita Beck »

Weird. I can confirm that problem when I generate either CHM or WebHelp. But when I generate PDF, the image is there and does seem to be rendered correctly.

The image looks just fine in the XML editor, regardless of which target is set as the primary.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Flare 7 issue with image size using percent value

Post by LTinker68 »

nsemple wrote:For some reason, Flare 7 is not interpreting the code the way that Flare 6 did. Anyone have an idea why?
Don't know if this is a contributing factor for this situation, but several of the Flare styles changed names slightly, so if you created styles for them in your stylesheet so that you could override the default styles as defined in MadCap.css, then you need to rename the styles in your stylesheet to use the new names. See this post for more info --> http://forums.madcapsoftware.com/viewto ... =6&t=12550
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
nsemple
Propeller Head
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am

Re: Flare 7 issue with image size using percent value

Post by nsemple »

Thanks for the info about the style name changes. I wasn't aware of that. The version 7 style name changes for madcap divs aren't part of the problem though. The div I am using is a simple div style defined in our css. It is not a built-in Madcap div style.

I've continued testing and it appears as though the problem exists regardless of the container div. Seems like there is an issue with Flare 7 interpreting a percentage value associated to the width and height of images. I've tried everything I can think of to fix this to no avail. I have also searched on the Web for any known issues regarding the use of percentages when setting the size of images, but haven't seen anything mentioning issues.

Can't figure out why setting the size of an image using a percentage value would work fine in Flare 6 and not work in Flare 7. The code I'm using is exactly the same. (width is a percentage, height is auto)
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Flare 7 issue with image size using percent value

Post by LTinker68 »

nsemple wrote:Can't figure out why setting the size of an image using a percentage value would work fine in Flare 6 and not work in Flare 7. The code I'm using is exactly the same. (width is a percentage, height is auto)
Your code may be the same, but MadCap's apparently isn't. You'll have to contact MadCap to see if they can determine a workaround or solution.
Image

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

Re: Flare 7 issue with image size using percent value

Post by NorthEast »

You haven't mentioned which output you see this problem in; WebHelp, HTML Help..?

I just tried your example above, setting the exact same properties on an image tag; and for me it looks fine in WebHelp generated by both Flare v7 and v6. (Note that setting a size as a % would not work for PDFs.)

If it's in WebHelp/HTML Help, what does the line containing the img tag that you posted above look like in the output.
Has it been modified in any way?
nsemple
Propeller Head
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am

Re: Flare 7 issue with image size using percent value

Post by nsemple »

Hi,

I am generating WebHelp and HTMLHelp. I experience the problem in both formats. I am not looking at PDFs or Word output. (Flare says that divs are not supported in Word.)

I looked at the output file as you suggested and something really weird that I don't understand seems to happen to the code. The source code of "width: 80%; height: auto;" changes for some reason in the output file to read "width: 1; height: 1". This explains why I cannot see the image (only the border around it that I've defined) in the resulting output, but I don't know why it would be converted like this. It doesn't make sense to me.

Here's an example of the code in my source file:

<p>
<img src="myimage.jpg" style="border-left-style: solid; border-left-width: 4px; border-left-color: #000000; border-right-style: solid; border-right-width: 4px; border-right-color: #000000; border-top-style: solid; border-top-width: 4px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 4px; border-bottom-color: #000000; width: 80%; height: auto;" />
</p>


For some reason, when the output is generated in Flare 7, the code for the width and height in the output file change to the value of "1" like this:

<p>
<img src="myimage.jpg" style="border-left-style: solid; border-left-width: 4px; border-left-color: #000000; border-right-style: solid; border-right-width: 4px; border-right-color: #000000; border-top-style: solid; border-top-width: 4px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 4px; border-bottom-color: #000000; width: 1; height: 1;" />
</p>
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Flare 7 issue with image size using percent value

Post by rob hollinger »

Turning off the "Generate Resized copies of scaled images" option in the Target > Advanced tab should fix this.
It happens on anything over 50%.
Rob Hollinger
MadCap Software
nsemple
Propeller Head
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am

Re: Flare 7 issue with image size using percent value

Post by nsemple »

That fixed it! Thank you.

Didn't realize this "Generate resized copies of scaled images" option on the Advanced tab of the Target Editor was even checked, but there was no issue with the project having this option checked in Flare 6.

The definition for this option according to Flare's Help is that "new copies of images will be generated where ever you have resized (scaled) them in your project. This means better quality images, but it also means more image files the output."
nsemple
Propeller Head
Posts: 86
Joined: Wed Feb 08, 2006 9:24 am

Re: Flare 7 issue with image size using percent value

Post by nsemple »

Heard back from Flare Tech Support. Apparently, they are aware of this bug.

Thanks everyone for your help.
Post Reply