使用 apache FOP,想要创建一个带有左对齐徽标的标题,右对齐三行地址,都对齐顶部。
如果在流程内部完成以下工作正常,但在静态内容标题('xsl-region-before')中,它会左右正确,但会在地址块下方对齐徽标,就好像表定义被完全忽略了.
我尝试了其他选项,例如尝试将两者内联,或使用浮点数,结果相似。标题只是将它们视为单独的块并将它们堆叠起来。有人有什么建议吗?
我发现this other issue询问关于页脚的相同问题,唉,没有回复: 需要instream-foreign-object and text to both align to the bottom in XSL-FO
相关片段如下:
<fo:layout-master-set>
<fo:simple-page-master page-height="8.5in" page-width="11in" master-name="only" margin=".5in .5in .5in .5in">
<fo:region-body region-name="xsl-region-body" margin-top="1in" margin-bottom=".5in"/>
<fo:region-before region-name="xsl-region-before"/>
<fo:region-after region-name="xsl-region-after"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="only">
<fo:static-content flow-name="xsl-region-before">
<fo:block font-size="7pt">
<fo:table width="10in">
<fo:table-column/>
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
<fo:external-graphic src="img/print_logo.png" content-width="2in"/>
</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center">
<fo:block text-align="right">
123 Credibility Street
</fo:block>
<fo:block text-align="right">
Chicago, IL 60606
</fo:block>
<fo:block text-align="right">
312-123-4567
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>