0

我正在使用 RML 并希望将我的文本对齐在段落的垂直中间。我怎么能做到这一点?

4

2 回答 2

0

否则你可以像这样定义例如::

 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTRE" spaceBefore="12.0" spaceAfter="6.0"/>
于 2012-04-20T05:53:12.480 回答
0

你能用一张桌子吗?像这样 ?

<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "rml.dtd" >
<document filename="example_08.pdf">
  <template showBoundary="0">
    <pageTemplate id="main">
      <pageGraphics/>
      <frame id="first" x1="100" y1="400" width="350" height="200" />
    </pageTemplate>
  </template>
  <stylesheet>
    <blockTableStyle id="blocktablestyle1">
      <blockValign value="MIDDLE" start="0,0" stop="-1,0"/>
    </blockTableStyle>
  </stylesheet>
  <story>
    <blockTable style="blocktablestyle1" colWidths="6cm,2cm">
      <tr>
        <td>
          <para>
              This is your paragraph. It's inside the &lt;para&gt; tags so the long 
              string of text is wrapped! You can set the horizontal space with 
              colWidths attribute on the blockTable.
          </para>
        </td>
        <td>The text valigned on the middle</td>
      </tr>
    </blockTable>
  </story>
</document>
于 2012-04-17T04:51:32.257 回答