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: Scaling images to fill available space




                           Hi!

   I'm trying to find ways to scale images in pdf output but I can't seem  
to find the right way.

   I have these cases which I need to support:

scale image to fill the width of the page, scaling depth accordingly
	=> this one can be done by setting imagedata attributes scalefit="1"  
width="100%"
scale image to fill the depth of the page, scaling width accordingly
scale image to fill the width and depth of the page (i.e. fill the whole  
page up to margins)
scale image to fill the available depth on the current page
	* width is scaled accordingly, unless set to 100% of page width
	* by available depth I mean that if the usable page height is H and there  
is e.g. text on the page that takes height TH, the size of the image is H  
- TH. Margins are respected, i.e. total page height = H + top margin +  
bottom margin.
	* picture may have minimum depth beyond which it should not be shrunk

   Are these doable?


   I read through

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

and

http://www.docbook.org/tdg/en/html/imagedata.html

   but could not figure out answers to these except the first one.


   Here's a sample of what I'm doing:

	<informalfigure>
		<mediaobject>
			<imageobject role="fo">
				<imagedata align="left" scalefit="1" width="100%"  
fileref="svg-test1.svg" format="SVG"/>
			</imageobject>
		</mediaobject>
	</informalfigure>



   Environment:
     docbook-xsl 1.74.0
     fop 0.95
     java 1.6.0_11
     saxon 9.1.0.5
     win xp sp 2



        ::Antti::







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