Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] How to align text and image in same line?

Expand Messages
  • J.Pietschmann
    ... The spec provides a variety of vertical alignment, baseline and baseline shift properties fro this purpose. ... Unfortunately, FOP 0.20.5 doesn t implement
    Message 1 of 4 , Nov 9, 2004
    View Source
    • 0 Attachment
      fanyinfo wrote:
      > In <fo:block>, I'm trying to align the text and image in the same
      > line, but couldn't get it right

      The spec provides a variety of vertical alignment, baseline
      and baseline shift properties fro this purpose.

      > My FOP do not support <fo:inline-container>.

      Unfortunately, FOP 0.20.5 doesn't implement any of the properties
      necessary for general vertical center alignment (FOP 1.0dev does).
      There may still be special cases where the effect may be achieved
      with a table (try display-align="center" on the cells) or by other
      means.

      J.Pietschmann
    • fanyinfo
      I have tried those properties but it still not work correctly. Following is a code snapshot, the border and color only for visual purpose. To see if you can
      Message 2 of 4 , Nov 9, 2004
      View Source
      • 0 Attachment
        I have tried those properties but it still not work correctly.
        Following is a code snapshot, the border and color only for visual
        purpose. To see if you can make it works. Again the output will look
        like
        -------------------- xxxxxxx
        xxxxxxxxxxxxxxxxxxxx x IMG x xxxxxxxxxxxxxxxxxxxxx
        -------------------- xxxxxxx



        <fo:table table-layout="fixed" width="100%">
        <fo:table-column/>
        <fo:table-body>
        <fo:table-row>
        <fo:table-cell display-align="before">
        <fo:block space-before="30pt" font-weight="normal" font-size="11pt"
        line-height="10pt" font-family="Verdana" border-before-style="solid"
        border-after-style="solid" border-start-style="solid" border-end-
        style="solid" border-top-color="red" border-bottom-color="red">
        • Each page is <fo:inline display-align="center" height="30pt"
        width="20pt" border-before-style="solid" border-after-style="solid"
        border-start-style="solid" border-end-style="solid" border-top-
        color="yellow" border-bottom-color="yellow" color="red" text-
        align="center">IMG START HERE
        <fo:external-graphic baseline-shift="super"
        src="img1.jpg" width="19.92pt" height="29.04pt" border="0"/>
        End HERE
        </fo:inline> inches wide.

        <fo:block font-size=".5pt" space-after="1.25pt"
        space-before="1.25pt"></fo:block>
        • Each picture is <fo:inline display-align="center"
        height="30pt" width="20pt" border-before-style="solid" border-after-
        style="solid" border-start-style="solid" border-end-style="solid"
        border-top-color="yellow" border-bottom-color="yellow" color="red"
        text-align="center"> IMG START HERE
        <fo:external-graphic baseline-shift="super"
        src="img2.jpg" width="18.96pt" height="29.04pt" border="0"/>
        End HERE
        </fo:inline> inches wide.
        </fo:block>
        </fo:table-cell>
        </fo:table-row>
        </fo:table-body>
        </fo:table>

        Thanks,
        Fanyin




        --- In XSL-FO@yahoogroups.com, "J.Pietschmann" <j3322ptm@y...> wrote:
        > fanyinfo wrote:
        > > In <fo:block>, I'm trying to align the text and image in the same
        > > line, but couldn't get it right
        >
        > The spec provides a variety of vertical alignment, baseline
        > and baseline shift properties fro this purpose.
        >
        > > My FOP do not support <fo:inline-container>.
        >
        > Unfortunately, FOP 0.20.5 doesn't implement any of the properties
        > necessary for general vertical center alignment (FOP 1.0dev does).
        > There may still be special cases where the effect may be achieved
        > with a table (try display-align="center" on the cells) or by other
        > means.
        >
        > J.Pietschmann
      Your message has been successfully submitted and would be delivered to recipients shortly.