【问题标题】:Netsuite advance PDF/HTML template: Setting footer to show only on the last pageNetsuite 高级 PDF/HTML 模板:将页脚设置为仅显示在最后一页
【发布时间】:2021-07-04 00:46:18
【问题描述】:

我在使页脚仅显示在 PDF 的最后一页时遇到问题。我的想法是,如果pagenumber == totalpages,我将获取最后一页码并显示页脚。

但我无法获取<pagenumber> 标记的值并将其分配给freemarker 变量,因为它是BFO 中的标记。有什么办法可以做到吗?

<#if pagenumber != totalPage>
  <macro id='footer'>Normal Footer</macro>
<#else>
  <macro id='footer'>last page footer</macro>
</#if>

我是这方面的初学者。

【问题讨论】:

    标签: pdf netsuite bfo


    【解决方案1】:

    您只需要在模板中的 last 引用中指定要使用的页脚,例如 footer="childpagesfooter"。 childpagesfooter 指向一个宏,其中有页脚的 HTML

    <pbr header=""
             footer="childpagesfooter"
             header-height="0mm"
             footer-height="0mm"
             width='200mm'
             height='500mm'
             size='Letter'/>
    
    
    // macro example
    <macro id="childpagesfooter"><div class="ui-div-footer">My Footer</div></macro>
    

    【讨论】:

    • 之前试过,但页脚在每一页都重复,我需要的是页脚只需要在最后一页显示。感谢您尝试提供帮助。 :)
    • @ChadricGotis 你在这找到什么了吗?我也需要这样的东西。
    猜你喜欢
    • 2017-02-19
    • 1970-01-01
    • 2022-01-20
    • 2018-10-03
    • 1970-01-01
    • 2018-10-20
    • 1970-01-01
    • 2019-07-18
    相关资源
    最近更新 更多