uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: Images in the tools docbook
Date Tue, 12 Oct 2010 07:54:01 GMT
  With the current docbook version it is not possible
to define the image size as scale down to fit.
Scale down to fit either scales the image
down to make it fit or if it fits its shown as it is.
Maybe a stylesheet hack could help here ...

In some cases scaling does not work because
the intrinsic image size is unknown to the
html generator.

I will now just scale my images down to make
them fit on an A4 page. Then they can be displayed
in their intrinsic size in all versions.


On 10/11/10 5:36 PM, Jörn Kottmann wrote:
>  Here is a nice link:
> http://www.docbook.org/tdg/en/html/imagedata.html
> Depending on the format we have one of the two cases:
> 1. Viewport is larger than the image, image will be rendered
> in its intrinsic size (will look nice)
> 2. Viewport is smaller than the image, image will be clipped
> In our formats both cases can occur at the same time,
> usually the html viewport area is larger than the letter
> pdf viewport area.
> In my opinion we want the image to be scaled down
> to the (pdf) viewport area if it is larger instead of clipping it.
> And it  should not be scaled up (to html viewport size) if it is smaller,
> then it should be rendered in its intrinsic size.
> But I cannot find a way to specify that.
> If that is not possible, we might have to make sure that all images
> are scaled to a size which make them fit into the smallest
> viewport we have.
> One reason the scale parameter is behaving so differently
> between pdf and html, might be that the html version
> does not know about the intrinsic image size.
> Marshall, do we use the graphic size extension?
> http://www.sagehill.net/docbookxsl/ImageSizing.html#ImageSizeExt
> Jörn
> On 10/11/10 3:17 PM, Jörn Kottmann wrote:
>>  On 10/11/10 1:56 PM, Thilo Götz wrote:
>>> On 10/11/2010 13:17, Jörn Kottmann wrote:
>>>>   The images are scaled nicely now in both versions, thanks to 
>>>> Marshalls
>>>> tip to use the width param instead of the scale param.
>>>> I scanned trough the pdf and added width="5.7in" to all images
>>> Frankly, I think using absolute numbers as scale parameter
>>> is not a good idea.  For example, our default format for the
>>> PDF docs is "letter", a format that's not used in large parts
>>> of the world.  If you format the docs as A4 so you can properly
>>> print them in your neck of the woods, the page width is different.
>>> For html, it's usually a good idea not to scale the graphics at
>>> all, if necessary, this can be done by the browser.
>> Yes that is true, my browser did a good job scaling the images,
>> its just the pdf generator which cannot properly scale the images.
>> The two solutions we found up to now, are using the width
>> parameter or pre-scaling the image itself.
>> Both solutions have the fixed scaling issue. When I optimize with
>> pre-scaling for letter format and the current page layout, then it might
>> not look nice if something changes, e.g. its printed on A4 or additional
>> text is inserted.
>> I will try to experiment with the scalefit parameter, which tries to
>> scale the image as large as possible.
>> Jörn

View raw message