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

Table Indenting

Expand Messages
  • Roger Tribe
    Hi, I am fairly new to XSLFO so forgive me if I sound a bit vague... The product I am writing produces letters with the layout and content produced on the fly.
    Message 1 of 2 , Apr 17, 2002
      Hi,
       
      I am fairly new to XSLFO so forgive me if I sound a bit vague...
       
      The product I am writing produces letters with the layout and content produced on the fly.
      The letters will have numerous tables included, but the left starting positions of each table will vary.
       
      I am trying to indent individual tables from the page margin without success.
      I have tried using margin-left, start-indent and position-absolute on the table node and although the text position within the cell moves, the start of the first cell in the table always appears at the page margin.
       
      Being a newbie I am not sure if the problem lies with my FO knowledge.
       
      I would very much appreciate a FO snippet.
       
      thanks
       
      rogerlt2002
    • G. Ken Holman
      ... Nope ... start-indent= or margin-left will indent a table, so if it isn t working for you, check the capabilities of the FO engine you are using. ... Below
      Message 2 of 2 , Apr 17, 2002
        At 2002-04-17 11:01 +0100, Roger Tribe wrote:
        >The product I am writing produces letters with the layout and content
        >produced on the fly.
        >The letters will have numerous tables included, but the left starting
        >positions of each table will vary.
        >
        >I am trying to indent individual tables from the page margin without success.
        >I have tried using margin-left, start-indent and position-absolute on the
        >table node and although the text position within the cell moves, the start
        >of the first cell in the table always appears at the page margin.
        >
        >Being a newbie I am not sure if the problem lies with my FO knowledge.

        Nope ... start-indent= or margin-left will indent a table, so if it isn't
        working for you, check the capabilities of the FO engine you are using.

        > I would very much appreciate a FO snippet.

        Below is a complete file, and I've attached a screen capture of the result.

        I hope this helps.

        ............... Ken

        p.s. since these are inherited attributes, don't forget to "turn off" the
        indent once you are in the table.

        <?xml version="1.0" encoding="utf-8"?><!--raw.fo-->
        <root xmlns="http://www.w3.org/1999/XSL/Format"
        font-family="Times" font-size="20pt">

        <layout-master-set>
        <simple-page-master master-name="frame"
        page-height="297mm" page-width="210mm"
        margin-top="15mm" margin-bottom="15mm"
        margin-left="15mm" margin-right="15mm">
        <region-body region-name="frame-body"/>
        </simple-page-master>
        </layout-master-set>

        <page-sequence master-reference="frame">
        <flow flow-name="frame-body">
        <block>This is a table without indent:</block>
        <table border="solid">
        <table-body>
        <table-cell>
        <block>Hello world.</block>
        </table-cell>
        </table-body>
        </table>
        <block>This is a table with indent:</block>
        <table border="solid" start-indent="5cm">
        <table-body start-indent="0">
        <table-cell>
        <block>Hello world.</block>
        </table-cell>
        </table-body>
        </table>
        </flow>
        </page-sequence>
        </root>
      Your message has been successfully submitted and would be delivered to recipients shortly.