0

I am using Apache Ofbiz 13, FreeMarker, XSLT, PostgreSQL, JDK 7. File *.ftl for export PDF file.

I tried make this text Một triệu, ba trăm hai mươi nghìn đồng chẵn. italic and in the same line with Tổng cộng: . I have a part of file supReturnPDFContent.fo.ftl (FreeMarker)

<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>

Description: ${uiLabelMap.Summary} = Tổng cộng

${totalDlvString?if_exists} == Một triệu, ba trăm hai mươi nghìn đồng chẵn.

result

enter image description here

I want 2 parts inline (same line) how to do this?

I also tried this solution, but not success:

<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>
Vy Do
  • 46,709
  • 59
  • 215
  • 313

1 Answers1

0

Use <fo:inline> as an alternative for <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>
Vy Do
  • 46,709
  • 59
  • 215
  • 313