我使用的是ApacheOfBiz13、freemarker、xslt、postgresql和JDK7。文件 *.ftl
用于导出pdf文件。
我试着写这段文字 Một triệu, ba trăm hai mươi nghìn đồng chẵn.
斜体,与 Tổng cộng:
. 我有一部分档案 supReturnPDFContent.fo.ftl
(自由标记)
<fo:table-row border="solid 0.2mm black">
<fo:table-cell text-align="left" number-columns-spanned="6">
<#assign totalDlvString = Static["com.olbius.baselogistics.util.LogisticsStringUtil"].ConvertDecimalToString(total)>
<fo:block line-height="20px" font-weight="bold" margin-left="5px">${uiLabelMap.Summary}: </fo:block><fo:block font-style="italic">${totalDlvString?if_exists}</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right" number-columns-spanned="1">
<#if total?has_content && total != 0>
<fo:block line-height="20px" margin-right="2px" text-align="right" font-weight="bold" margin-left="5px">${Static["org.ofbiz.base.util.UtilFormatOut"].formatDecimalNumber(total?if_exists, "#,##0", locale)}</fo:block>
<#else>
<fo:block></fo:block>
</#if>
</fo:table-cell>
</fo:table-row>
说明: ${uiLabelMap.Summary}
=
Tổng cộng ${totalDlvString?if_exists}
== Một triệu, ba trăm hai mươi nghìn đồng chẵn.
结果
我想两个部分内联(同一行)如何做到这一点?
我也尝试过这个解决方案,但没有成功:
<fo:table-cell text-align="left" number-columns-spanned="6">
<#assign totalDlvString = Static["com.olbius.baselogistics.util.LogisticsStringUtil"].ConvertDecimalToString(total)>
<fo:block line-height="20px" margin-left="5px">
<fo:block font-weight="bold">${uiLabelMap.Summary}: </fo:block>
<fo:block font-style="italic">${totalDlvString?if_exists}</fo:block>
</fo:block>
</fo:table-cell>
1条答案
按热度按时间o2rvlv0m1#
使用
<fo:inline>
作为<fo:block>
```<fo:table-cell text-align="left" number-columns-spanned="6">
<#assign totalDlvString = Static["com.olbius.baselogistics.util.LogisticsStringUtil"].ConvertDecimalToString(total)>
<fo:block line-height="20px" margin-left="5px">
<fo:inline font-weight="bold">${uiLabelMap.Summary}: </fo:inline>
<fo:inline font-style="italic">${totalDlvString?if_exists}</fo:inline>
</fo:block>
</fo:table-cell>