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

xsl-fo question on vertical-align for

Expand Messages
  • Fanyin Wang
    Hi all, Here s my fo
    Message 1 of 4 , Jan 12, 2005
    • 0 Attachment
      Hi all,

      Here's my fo
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
      <fo:layout-master-set>
      <fo:simple-page-master master-name="simple">
      <fo:region-body/>
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="simple">
      <fo:flow flow-name="xsl-region-body">
      <fo:block line-height="30pt" line-stacking-strategy="line-height" vertical-align="sub">
      <fo:inline vertical-align="sub" line-height="15pt">
      What is Bella collected pictures Bella collected
      <fo:external-graphic src="fraction.jpg" width="18.96pt" height="29.04pt" border="0"/>
      pictures Bella collected pictures Bella collected pictures collected
      <fo:external-graphic src="fraction.jpg" width="18.96pt" height="29.04pt" border="0"/>
      What is the greatest number of these photographs that Bella can fit side by side in one row across the album?
      <fo:external-graphic src="fraction.jpg" width="18.96pt" height="29.04pt" border="0"/>
      Bella collected pictures Bella collected pictures Bella collected pictures Bella collected pictures Bella
      </fo:inline>
      </fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>
      (image is a fraction number such as 1/3)
      The PDF that I want is each row of text and image aligned as "text text 1/3 text text". In my code, it works only at first row, but when the text go to next line ( I have no control when it will go to next line), the vertical-align="sub" lost it function until hit the image object, then it functional again.
      I have tried many attributes, but failed. Is anyone know why its behavior like this and how to make it works? I'm using Apache FOP.

      Thank you very much!
      Fanyin


      ---------------------------------
      Do you Yahoo!?
      Yahoo! Mail - Easier than ever with enhanced search. Learn more.

      [Non-text portions of this message have been removed]
    • J.Pietschmann
      ... Vertical align functionality is limited in FOP 0.20.5, and best used on short single words only. What effect are you trying to achieve? Using
      Message 2 of 4 , Jan 13, 2005
      • 0 Attachment
        Fanyin Wang wrote:
        > The PDF that I want is each row of text and image aligned as "text
        > text 1/3 text text". In my code, it works only at first row, but when
        > the text go to next line ( I have no control when it will go to next
        > line), the vertical-align="sub" lost it function until hit the image
        > object, then it functional again. I have tried many attributes, but
        > failed. Is anyone know why its behavior like this and how to make it
        > works? I'm using Apache FOP.

        Vertical align functionality is limited in FOP 0.20.5, and best used
        on short single words only. What effect are you trying to achieve? Using
        vertical-align="sub" on longer phrases seems to be a bit unusual to me.

        J.Pietschmann
      • Fanyin Wang
        Thanks for the reply. I m trying to make the text and image at same line ( if you can use my fo to generate the pdf, you will see the result of first line is
        Message 3 of 4 , Jan 13, 2005
        • 0 Attachment
          Thanks for the reply.

          I'm trying to make the text and image at same line ( if you can use my fo to generate the pdf, you will see the result of first line is what I want to achieve). No matter where the image show up in the text, it always aligned up with text around ( before and after). If the text fits in at one line, there's no problem in my fo, but when text is to long, and it goes next line, the text before image is not inherited "sub", the text after image is "sub". If this is FOP 0.20.5 bug, what is the best way to achieve this?

          Thanks again.
          Fanyin





          "J.Pietschmann" <j3322ptm@...> wrote:
          Fanyin Wang wrote:
          > The PDF that I want is each row of text and image aligned as "text
          > text 1/3 text text". In my code, it works only at first row, but when
          > the text go to next line ( I have no control when it will go to next
          > line), the vertical-align="sub" lost it function until hit the image
          > object, then it functional again. I have tried many attributes, but
          > failed. Is anyone know why its behavior like this and how to make it
          > works? I'm using Apache FOP.

          Vertical align functionality is limited in FOP 0.20.5, and best used
          on short single words only. What effect are you trying to achieve? Using
          vertical-align="sub" on longer phrases seems to be a bit unusual to me.

          J.Pietschmann


          ---------------------------------
          Yahoo! Groups Links

          To visit your group on the web, go to:
          http://groups.yahoo.com/group/XSL-FO/

          To unsubscribe from this group, send an email to:
          XSL-FO-unsubscribe@yahoogroups.com

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



          ---------------------------------
          Do you Yahoo!?
          Read only the mail you want - Yahoo! Mail SpamGuard.

          [Non-text portions of this message have been removed]
        • J.Pietschmann
          ... You are out of luck. The only way to get inline images aligned in FOP is to make them smaller than the line height. J.Pietschmann
          Message 4 of 4 , Jan 15, 2005
          • 0 Attachment
            Fanyin Wang wrote:
            > I'm trying to make the text and image at same line ( if you can use
            > my fo to generate the pdf, you will see the result of first line is
            > what I want to achieve). No matter where the image show up in the
            > text, it always aligned up with text around ( before and after). If
            > the text fits in at one line, there's no problem in my fo, but when
            > text is to long, and it goes next line, the text before image is not
            > inherited "sub", the text after image is "sub". If this is FOP 0.20.5
            > bug, what is the best way to achieve this?

            You are out of luck. The only way to get inline images aligned
            in FOP is to make them smaller than the line height.

            J.Pietschmann
          Your message has been successfully submitted and would be delivered to recipients shortly.