AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Graphics

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  When I specified a image as follows, it created a thin white strip on the top of the image. How should I specify it?
<fo:block-container position="fixed" top="0" left="0" 
  height="AAApx" width="BBBpx"  background-color="white">
  <fo:block>
    <fo:external-graphic src="test.jpg" scaling="non-uniform" 
      content-height="AAApx" content-width="BBBpx" />
  </fo:block>
</fo:block-container>
[No.2005052701]
A. 

Please specify line-height="1" and font-size="0pt" for fo:block. So the example becomes:

<fo:block-container position="fixed" top="0" left="0" 
  height="AAApx" width="BBBpx"  background-color="white">
  <fo:block line-height="1" font-size="0pt">
    <fo:external-graphic ...

Because fo:external-graphic is an inline element, it makes line area. The default height of line area is 1.2em, so you should specify line-height="1" for the block.

However, even though line-height="1" is specified, a graphic is placed on top of a baseline and there remains a space under the baseline as a result. In order to avoid this, you should specify font-size="0pt", too.


Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.