9.4 Adding content before and after table in PDF Reports
- Create a template with slots at location
                        “config\resources\uidownload\templates\pdf“
                        The file should be named with tableCode example ManageBrandBrand.xsl where ManageBrandBrand is tablecode. Use the below starter template, <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" > <xsl:include href="resources/com/ofss/digx/framework/list/universal/utils/ui-download.xsl" /> <xsl:template match="/"> <xsl:call-template name="ui-download"> <xsl:with-param name="data" select="." /> </xsl:call-template> </xsl:template> <xsl:template name="top-slot"></xsl:template> <xsl:template name="bottom-slot"></xsl:template> </xsl:stylesheet> 
- Now new content can be added to the top-slot and bottom-slot templates,
                        example
                        <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" > <xsl:include href="resources/com/ofss/digx/framework/list/universal/utils/ui-download.xsl" /> <xsl:template match="/"> <xsl:call-template name="ui-download"> <xsl:with-param name="data" select="." /> </xsl:call-template> </xsl:template> <xsl:template name="top-slot"> <xsl:param name="data" /> <fo:block> <xsl:value-of select="$data/status/apiType" /> </fo:block> </xsl:template> <xsl:template name="bottom-slot"> <xsl:param name="data" /> <fo:block> <xsl:value-of select="$data/status/apiType" /> </fo:block> </xsl:template> </xsl:stylesheet> 
- The complete response object can be accessed using the $data param, excluding
                    the items.
                        { "status": { "result": "SUCCESSFUL", "contextID": "0063eZOykwSAHReEtbToWH00E9EP000CXx", "message": { "type": "INFO" }, "apiType": "brand" }, "brandDTOs": [] } 
Parent topic: Consistent UI Download