小编Vis*_*hnu的帖子

38
推荐指数
2
解决办法
10万
查看次数

如何为xsl-fo中的每个页面添加页眉和页脚以生成pdf

请找到以下xsl-fo,尝试为pdf中的每个页面设置页眉和页脚,但在最后一页只有第一页和页脚的页眉.但在这里我需要每一页.如何执行此操作.

    <?xml version="1.0" encoding="UTF-8" ?>
     <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match='/'>
    <fo:root>
        <fo:layout-master-set>
            <fo:simple-page-master master-name="my-page"
                               page-height="29.7cm"
                  page-width="21cm"
                  margin-top="1cm"
                  margin-bottom="0.1cm"
                  margin-left="0.8cm"
                  margin-right="1.0cm" >
                <fo:region-body margin-top="2.5cm" margin-bottom="2.5cm"/>
                <fo:region-before extent="2.0cm"/>
                <fo:region-after extent="2.0cm"/>
            </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="my-page">
            <fo:flow flow-name="xsl-region-before">
                <fo:block>
                    Message Body
                </fo:block>
            </fo:flow>
            <fo:flow flow-name="xsl-region-body">
                Message Content
            </fo:flow>

            <fo:flow flow-name="xsl-region-after">
                <h2>
                    Page Footer
                </h2>
            </fo:flow>
        </fo:page-sequence>
    </fo:root>
</xsl:template>
<xsl:template name="replace-returns">
    <xsl:param name="text"/>
    <xsl:choose>
        <xsl:when test="contains($text, '&#xa;')">
            <xsl:value-of select="substring-before($text, '&#xa;')"/>
            <xsl:value-of select="'&lt;br /&gt;'" disable-output-escaping="yes"/>
            <xsl:call-template name="replace-returns">
                <xsl:with-param name="text" select="substring-after($text, '&#xa;')"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of …
Run Code Online (Sandbox Code Playgroud)

xml xslt xsl-fo xslt-1.0

13
推荐指数
1
解决办法
3万
查看次数

如何在CRM中使用JavaScript打开现有实体表单?

如果单击自定义功能区按钮,是否可以使用JavaScript打开现有实体表单,或者是否有其他方法可以打开现有表单(例如,活动表单)?

crm dynamics-crm dynamics-crm-2011 dynamics-crm-4

2
推荐指数
1
解决办法
1万
查看次数