Fop
No consigo que el PDF generado tenga varias hojas, y se me cortan los datos al terminar la primera.
muchas gracias.
DANIEL
<?xml version="1.0"?>
<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 xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="single"
page-width="297mm" page-height="210mm"
margin-top="1.0in" margin-bottom="1.0in"
margin-left="1.0in" margin-right="1.0in">
<fo:region-before extent="1.4in"/>
<fo:region-body/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="many">
<fo:single-page-master-reference master-reference="single" />
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="many">
<fo:static-content flow-name="xsl-region-before">
<fo:block-container border-width="0.8pt" border-style="solid" border-color="black" height="0.6in" width="9.50in" top="0in" padding="0.25in" position="absolute">
<fo:block text-align="center" font-family="serif" font-weight="bold" font-size="32pt">
<xsl:value-of select="//title"/>
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block-container border-width="0.6pt" border-style="solid" border-color="black" height="5in" width="9.50in" top="1.4in" padding="0.25in" position="absolute" >
<fo:table>
<xsl:for-each select="Report/rowtitle/rtElement">
<fo:table-column>
<xsl:attribute name="column-width">
<xsl:apply-templates select="@size"/>
</xsl:attribute>
</fo:table-column>
</xsl:for-each>
<fo:table-body>
<xsl:apply-templates select="//rowtitle">
</xsl:apply-templates>
<xsl:apply-templates select="//row">
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="row">
<fo:table-row>
<xsl:for-each select="Element">
<fo:table-cell>
<fo:block>
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:template>
<xsl:template match="rowtitle">
<fo:table-row>
<xsl:for-each select="rtElement">
<fo:table-cell>
<fo:block font-size="10" font-weight="bold" text-decoration="underline">
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:template>
<xsl:template match="@size">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
muchas gracias.
DANIEL
<?xml version="1.0"?>
<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 xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="single"
page-width="297mm" page-height="210mm"
margin-top="1.0in" margin-bottom="1.0in"
margin-left="1.0in" margin-right="1.0in">
<fo:region-before extent="1.4in"/>
<fo:region-body/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="many">
<fo:single-page-master-reference master-reference="single" />
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="many">
<fo:static-content flow-name="xsl-region-before">
<fo:block-container border-width="0.8pt" border-style="solid" border-color="black" height="0.6in" width="9.50in" top="0in" padding="0.25in" position="absolute">
<fo:block text-align="center" font-family="serif" font-weight="bold" font-size="32pt">
<xsl:value-of select="//title"/>
</fo:block>
</fo:block-container>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block-container border-width="0.6pt" border-style="solid" border-color="black" height="5in" width="9.50in" top="1.4in" padding="0.25in" position="absolute" >
<fo:table>
<xsl:for-each select="Report/rowtitle/rtElement">
<fo:table-column>
<xsl:attribute name="column-width">
<xsl:apply-templates select="@size"/>
</xsl:attribute>
</fo:table-column>
</xsl:for-each>
<fo:table-body>
<xsl:apply-templates select="//rowtitle">
</xsl:apply-templates>
<xsl:apply-templates select="//row">
</xsl:apply-templates>
</fo:table-body>
</fo:table>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="row">
<fo:table-row>
<xsl:for-each select="Element">
<fo:table-cell>
<fo:block>
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:template>
<xsl:template match="rowtitle">
<fo:table-row>
<xsl:for-each select="rtElement">
<fo:table-cell>
<fo:block font-size="10" font-weight="bold" text-decoration="underline">
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:template>
<xsl:template match="@size">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
1 Respuesta
Respuesta de icalv000
1