Re: [docbook-apps] intrinsic size of images

From
Bob Stayton <>
Date
2007-02-18T06:43:56+00:00
ID
0f8501c75328$2c01c820$6400a8c0@totoro
Thread
Re: [docbook-apps] intrinsic size of images
I found the problem by validating a sample file 
with the attributes you were trying to use.  The description in my book has 
a typo.  Where it says contentheight, the attribute name is actually 
contentdepth in DocBook.  When I validated, it pointed out that I had an 
invalid attribute.  

 

If you are using FOP 0.93, then it works with the 
right attribute name.  If you are using FOP 0.20.5, it is a known problem 
that it does not handle image scaling correctly.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

  
----- Original Message ----- 

  
From: 
  Hinrich Aue 

  
To:  
  

  
Sent: Friday, February 16, 2007 2:16 
  AM

  
Subject: AW: [docbook-apps] intrinsic 
  size of images

  

  

  
Hello again,

  
 

  
but I was not specific 
  enough.

  
I'm trying to get the exact behaviour described 
  at

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

  
 

  
> To keep a graphic for printed output at its 
  natural size unless it is too 

  
> large to fit the available width, in which case 
  shrink it to fit, use

  
> scalefit="1", width="100%", and 
  contentheight="100%" attributes.

  
 

  
I tried nearly every combination 
  of

  
Width

  
Contentheight

  
Scalefit

  
 

  
But it does not work.

  
When I use 

  
 

  
> scalefit="1", width="100%", and 
  contentheight="100%" attributes.

  
 

  
Then the images are scaled 
  wrong.

  
But I cannot figure out wich part is 
  wrong

  
Xsltproc, Fop or my brain? (most likely my brain, I'm 
  stuck)

  
 

  
What works for me now is:

  
 

  
Use no attributes for small images - works 
  fine

  
Use width=100% attributes for images too big for the 
  pdf page - images are scaled to the right size.

  
 

  
Thanks,

  
      
  Hinrich