[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Always proportionally scale imagedata to page.
Hi David, I think I understand what you want, but I need one clarification. This combination: > scalefit="1" > width="100%" > contentdepth="100%" does not have the effect that you want. With contentdepth="100%", the image will be its intrinsic height. The other two attributes kick in only if the intrinsic width is too big to fit the available width, in which case the image will be proportionally scaled down to fit the 100% viewport width. That doesn't match your desire to maximize the size. I think you intended: scalefit="1" width="100%" depth="100%" This sets the viewport to the maximum available size, and scales up the image until it bumps into one of the edges of the viewport. But I'm not clear what you mean by the "largest size on the page". Does that mean for an image which is taller than it is wide, that it should scale to fit the remaining vertical space on the page (which might be quite small)? Or perhaps the largest size on a new page (which may require a forced page break to get the largest vertical space available)? Regarding the customization process, you pretty much have to customize the process.image template. This requires understanding the sequence of how the DocBook scaling attributes are massaged into the FO scaling attributes. Some attributes take precedence over others, so they interact a bit and it gets a little complicated. Being able to specify default values for some of the attributes would be a nice feature request. If you can add a preprocessing XSLT step, you could process with an identity stylesheet that just adds the attributes you want to imagedata (with logic to add them only if no overrides present). Then you don't have to mess with process.image. Bob Stayton Sagehill Enterprises bobs@sagehill.net ----- Original Message ----- From: "David E Nedrow" <nedlist@grandviewtheatre.net> To: <docbook-apps@lists.oasis-open.org> Sent: Wednesday, March 25, 2009 8:16 AM Subject: [docbook-apps] Always proportionally scale imagedata to page. >I would always like to have any images scaled proportionally to their >largest size on the page, and be able to override this for individual >images. Sort of the reverse of what happens by default. > > Would I handle this in a customization of <imagedata/> or > <process.image/>? > > I've tried variants of both with bad results (read: I did something wrong > and it didn't work at all). > > Basically, I want the following attributes defined for all imagedata > items... > > scalefit="1" > width="100%" > contentdepth="100%" > > I know this is probably easy, but it's been several years since I worked > directly with the stylesheets and the cobwebs are thick. > > Any help would be greatly appreciated. > > -David > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]