AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML テクニック

グラフィクス

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  次のように画像を指定すると上部に白い線が入ってしまいました。どうすればよいのでしょうか。
<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. 

fo:blockline-height="1"font-size="0pt" を指定してください。次のようになります。

<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 ...

まず、fo:external-graphic は inline要素なので Line Area が作成されます。デフォルトの行の高さは 1.2em なので line-height="1" を指定します。

しかし、line-height="1" としても画像はデフォルトではベースラインの上に配置されるので、ベースラインより下の分だけのアキができてしまいます。これをなくすには font-size="0pt" の指定が必要です。


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