OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Graphic scaling, yet again


Hello,

I know this topic has been thrashed to death, but I have a very
specific question, so bear with me for a minute.

I have a particular project where the primary output has been PDF for
some time, but where I now need to generate HTML Help.  There are a
lot of images in figures, some large and some small.  My aim has been
to leave images that fit in the available space as they are, and to
scale down images that are too large.  Until now, I have been doing
this manually by adding:

contentwidth="12cm"
scalefit="1"

to the imagedata elements _of images that are too large_.  This is
tedious because I need to identify which images are too large, and
measure the space on the page available, which might change if I
change the layout.  But it works.

I now need to generate HTML Help, so as a first step I want to clean
up this hack.  In his book here:

http://www.sagehill.net/docbookxsl/ImageSizing.html

and in the thread starting here:

http://lists.oasis-open.org/archives/docbook-apps/200411/msg00294.html

Bob suggests:

width="100%"
scalefit="1"
contentheight="100%"

In the thread, Bob later corrects 'contentheight' to 'contentdepth'.
Even using 'contentdepth', this doesn't work for me generating a PDF
with XEP.  It appears it didn't work for Sam Steingold (the OP)
either, but the thread ends with Bob asking whether Sam was using FOP.
(If the thread went on, I missed it, and lists.oasis-open.org doesn't
seem to have it.)

Bob, I'm using XEP, and it doesn't work here either.  No images are
scaled at all for me, which is the correct behaviour for ones that
fit, but incorrect for the large ones.  I am using xsltproc---is it
because the XSLT processor can't determine the intrinsic image size?
This is the FO:

<fo:external-graphic src="url(images/clinical-desktop.png)"
                     width="100%"
                     height="auto"
                     content-width="auto"
                     content-height="100%"
                     text-align="center"/>


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/

PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]