forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@1003 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
689b16771b
commit
672cf13bd4
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,91 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
|
||||
<xsl:template match="GUIA">
|
||||
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4"
|
||||
page-height="29.7cm"
|
||||
page-width="21cm"
|
||||
margin-top="2cm"
|
||||
margin-bottom="2cm"
|
||||
margin-left="2cm"
|
||||
margin-right="2cm">
|
||||
<fo:region-body />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:table table-layout="fixed" width="100%" space-before.optimum="0pt" space-after.optimum="0pt">
|
||||
<fo:table-column column-width="10cm"/>
|
||||
<fo:table-column/>
|
||||
<fo:table-column/>
|
||||
<fo:table-column/>
|
||||
<fo:table-column/>
|
||||
<fo:table-header>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">
|
||||
Cuidado Prestado
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">
|
||||
Código
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">
|
||||
Valor
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">
|
||||
Benef.
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">
|
||||
Entidade
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-header>
|
||||
<fo:table-body>
|
||||
<xsl:for-each select="CORPO/LINHA_CORPO">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="PRODUTO/DESCRICAO" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRODUTO/CODIGO_TABELA" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_TOTAL" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_BENEFICIARIO" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_ENTIDADE" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
<?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.1" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
|
||||
<xsl:template match="GUIA">
|
||||
<fo:root>
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
|
||||
<fo:region-body />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:table table-layout="fixed" width="100%" space-before.optimum="0pt" space-after.optimum="0pt">
|
||||
<fo:table-column column-width="10cm" />
|
||||
<fo:table-column />
|
||||
<fo:table-column />
|
||||
<fo:table-column />
|
||||
<fo:table-column />
|
||||
<fo:table-header>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">Cuidado Prestado</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">Código</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">Valor</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">Benef.</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="center" font-weight="bold">Entidade</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-header>
|
||||
<fo:table-body>
|
||||
<xsl:for-each select="CORPO/LINHA_CORPO">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="PRODUTO/DESCRICAO" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRODUTO/CODIGO_TABELA" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_TOTAL" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_BENEFICIARIO" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border="0.7pt solid #000000">
|
||||
<fo:block font-size="10pt" text-align="right">
|
||||
<xsl:value-of select="PRECO/PRECO_ENTIDADE" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
<table-row xmlns="http://www.w3.org/1999/XSL/Format">
|
||||
<table-cell />
|
||||
</table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,67 +1,55 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Create the page layout
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
|
||||
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
|
||||
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
|
||||
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
|
||||
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
|
||||
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0">
|
||||
|
||||
<xsl:template match="office:document-content">
|
||||
<importacao>
|
||||
<xsl:apply-templates select="office:body" />
|
||||
</importacao>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="office:body">
|
||||
<xsl:apply-templates select="office:spreadsheet" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="office:spreadsheet">
|
||||
<xsl:apply-templates select="table:table" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="table:table">
|
||||
<xsl:for-each select="table:table-row">
|
||||
<xsl:if test="position() > 1">
|
||||
<entrada>
|
||||
<xsl:for-each select="table:table-cell">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() = 1">
|
||||
<tema>
|
||||
<xsl:apply-templates />
|
||||
</tema>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 2">
|
||||
<risco>
|
||||
<xsl:apply-templates />
|
||||
</risco>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 3">
|
||||
<requisito>
|
||||
<xsl:apply-templates />
|
||||
</requisito>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 4">
|
||||
<medida>
|
||||
<xsl:apply-templates />
|
||||
</medida>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</entrada>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text:p">
|
||||
<linha>
|
||||
<xsl:value-of select="." />
|
||||
</linha>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" version="1.0">
|
||||
<xsl:template match="office:document-content">
|
||||
<importacao>
|
||||
<xsl:apply-templates select="office:body" />
|
||||
</importacao>
|
||||
</xsl:template>
|
||||
<xsl:template match="office:body">
|
||||
<xsl:apply-templates select="office:spreadsheet" />
|
||||
</xsl:template>
|
||||
<xsl:template match="office:spreadsheet">
|
||||
<xsl:apply-templates select="table:table" />
|
||||
</xsl:template>
|
||||
<xsl:template match="table:table">
|
||||
<xsl:for-each select="table:table-row">
|
||||
<xsl:if test="position() > 1">
|
||||
<entrada>
|
||||
<xsl:for-each select="table:table-cell">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() = 1">
|
||||
<tema>
|
||||
<xsl:apply-templates />
|
||||
</tema>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 2">
|
||||
<risco>
|
||||
<xsl:apply-templates />
|
||||
</risco>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 3">
|
||||
<requisito>
|
||||
<xsl:apply-templates />
|
||||
</requisito>
|
||||
</xsl:when>
|
||||
<xsl:when test="position() = 4">
|
||||
<medida>
|
||||
<xsl:apply-templates />
|
||||
</medida>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</entrada>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="text:p">
|
||||
<linha>
|
||||
<xsl:value-of select="." />
|
||||
</linha>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,74 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
|
||||
<xsl:template match="LISTA_FICHAS">
|
||||
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
|
||||
<fo:region-before extent="30pt"/>
|
||||
<fo:region-body margin-top="30pt"/>
|
||||
<fo:region-after extent="6pt"
|
||||
padding="6pt 1in"
|
||||
display-align="after"/>
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:static-content flow-name="xsl-region-before">
|
||||
<fo:block font-size="14pt" text-align="center" font-weight="bold">
|
||||
RELAÇÃO DE FICHAS DE APTIDÃO ENVIADAS
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:table table-layout="fixed" width="100%" space-before.optimum="10pt"
|
||||
border="1pt solid #000000">
|
||||
<fo:table-column/>
|
||||
<fo:table-column column-width="100pt"/>
|
||||
<fo:table-column column-width="100pt"/>
|
||||
<fo:table-body >
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
|
||||
NOME
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
|
||||
DATA EXAME
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">
|
||||
PRÓXIMO EXAME
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="FICHA">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="NOME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="DATA_EXAME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="DATA_PROXIMO_EXAME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:block font-size="8pt" text-align="left">
|
||||
<xsl:value-of select="DATA_EXTENSO" />
|
||||
</fo:block>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
<?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.1" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
|
||||
<xsl:template match="LISTA_FICHAS">
|
||||
<fo:root>
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
|
||||
<fo:region-body margin-top="30pt" />
|
||||
<fo:region-before extent="30pt" />
|
||||
<fo:region-after extent="6pt" padding="6pt 1in" display-align="after" />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:static-content flow-name="xsl-region-before">
|
||||
<fo:block font-size="14pt" text-align="center" font-weight="bold">RELAÇÃO DE FICHAS DE APTIDÃO ENVIADAS</fo:block>
|
||||
</fo:static-content>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:table table-layout="fixed" width="100%" space-before.optimum="10pt" border="1pt solid #000000">
|
||||
<fo:table-column />
|
||||
<fo:table-column column-width="100pt" />
|
||||
<fo:table-column column-width="100pt" />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">NOME</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">DATA EXAME</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" font-weight="bold" space-before="5pt" space-after="5pt">PRÓXIMO EXAME</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="FICHA">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="NOME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" border-right-color="black" border-right-style="solid" border-right-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="DATA_EXAME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin">
|
||||
<fo:block font-size="8pt" font="Arial" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="DATA_PROXIMO_EXAME" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:block font-size="8pt" text-align="left">
|
||||
<xsl:value-of select="DATA_EXTENSO" />
|
||||
</fo:block>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
@ -1,313 +1,283 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
|
||||
<xsl:template match="fax">
|
||||
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm"
|
||||
margin-top="1.5cm" margin-bottom="1.5cm" margin-left="2cm" margin-right="2cm">
|
||||
<fo:region-body margin-top="60pt" margin-bottom="20pt"/>
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:block font-size="14pt" text-align="right" font-weight="bold">
|
||||
FAX
|
||||
</fo:block>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº de Páginas (incluíndo esta)</fo:inline>
|
||||
/ <fo:inline font-size="8pt">Number of pages (including this one): </fo:inline>
|
||||
<fo:inline font-weight="bold">
|
||||
<fo:page-number-citation ref-id="endofdoc"/>
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
<fo:table table-layout="fixed" width="100%">
|
||||
<fo:table-column column-width="100pt"/>
|
||||
<fo:table-column column-width="120pt"/>
|
||||
<fo:table-column column-width="120pt"/>
|
||||
<fo:table-column/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Data </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Date: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="data" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Para </fo:inline>
|
||||
/ <fo:inline font-size="8pt">To: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Empresa </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Company: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-empresa" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Fax </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Fax number: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-fax" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">De </fo:inline>
|
||||
/ <fo:inline font-size="8pt">From: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||
E-mail:
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="email" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Fax </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Fax number: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="fax" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Tel. </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Phone number: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="telefone" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" number-columns-spanned="4">
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row height="5pt">
|
||||
<fo:table-cell number-columns-spanned="4">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="2pt">
|
||||
<fo:inline font-weight="bold">Assunto </fo:inline>
|
||||
/ <fo:inline font-size="8pt">Subject: </fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="assunto" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:table table-layout="fixed" width="100%" space-before="20pt">
|
||||
<fo:table-column column-width="50pt"/>
|
||||
<fo:table-column column-width="170pt"/>
|
||||
<fo:table-column column-width="50pt"/>
|
||||
<fo:table-column/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||
Cliente:
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="cliente" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||
Local:
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="local" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||
Data:
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="data-marcacao" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">
|
||||
Hora:
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="hora-marcacao" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
<fo:block font-size="10pt" text-align="left" space-before="20pt">
|
||||
Exmos. Senhores,
|
||||
</fo:block>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="10pt">
|
||||
Informo que o<xsl:if test="numero-trabalhadores > 1">s</xsl:if>
|
||||
seguinte<xsl:if test="numero-trabalhadores > 1">s</xsl:if>
|
||||
colaborador<xsl:if test="numero-trabalhadores > 1">es</xsl:if>
|
||||
<xsl:if test="numero-trabalhadores > 1"> irão</xsl:if>
|
||||
<xsl:if test="numero-trabalhadores = 1"> irá</xsl:if>
|
||||
comparecer nas vossas instalações para colheita:
|
||||
</fo:block>
|
||||
|
||||
<fo:table space-before="10pt">
|
||||
<fo:table-column column-width="200pt"/>
|
||||
<fo:table-column />
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">
|
||||
NOME DO FUNCIONÁRIO
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" space-before="2pt">
|
||||
DATA_NASCIMENTO
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">
|
||||
PERFIL
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="trabalhador">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="left" space-before="2pt">
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="data-nascimento" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="right" space-before="2pt">
|
||||
<xsl:value-of select="perfil" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<xsl:for-each select="perfil">
|
||||
<fo:block font-size="10pt" text-align="justify" space-before="10pt">
|
||||
<fo:inline font-weight="bold" text-decoration="underline">
|
||||
PERFIL <xsl:value-of select="nome" />
|
||||
</fo:inline>:
|
||||
<xsl:for-each select="ecd">
|
||||
<xsl:if test="position() > 1">, </xsl:if>
|
||||
<xsl:value-of select="." />
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
|
||||
<fo:table space-before="20pt">
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="12pt" text-align="LEFT" space-before="2pt">
|
||||
AGRADEÇO QUE ESTA LISTAGEM NOS SEJA REENVIADA COM INDICAÇÃO DAS
|
||||
EVENTUAIS FALTAS OCORRIDAS
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
<fo:block font-size="10pt" text-align="left" space-before="10pt">
|
||||
Sem outro assunto de momento, aproveitamos para apresentar os nossos melhores cumprimentos,
|
||||
</fo:block>
|
||||
|
||||
<fo:block font-size="10pt" text-align="left" space-before="30pt">
|
||||
<xsl:value-of select="nome"/>
|
||||
</fo:block>
|
||||
<fo:block id="endofdoc"></fo:block>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
<?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.1" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
|
||||
<xsl:template match="fax">
|
||||
<fo:root>
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="1.5cm" margin-bottom="1.5cm" margin-left="2cm" margin-right="2cm">
|
||||
<fo:region-body margin-top="60pt" margin-bottom="20pt" />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:block font-size="14pt" text-align="right" font-weight="bold">FAX</fo:block>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº de Páginas (incluíndo esta)</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Number of pages (including this one):</fo:inline>
|
||||
<fo:inline font-weight="bold">
|
||||
<fo:page-number-citation ref-id="endofdoc" />
|
||||
</fo:inline>
|
||||
</fo:block>
|
||||
<fo:table table-layout="fixed" width="100%">
|
||||
<fo:table-column column-width="100pt" />
|
||||
<fo:table-column column-width="120pt" />
|
||||
<fo:table-column column-width="120pt" />
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Data</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Date:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="data" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Para</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">To:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Empresa</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Company:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-empresa" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Fax</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Fax number:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="contacto-fax" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">De</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">From:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">E-mail:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="email" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Fax</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Fax number:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="fax" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<fo:inline font-weight="bold">Nº Tel.</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Phone number:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="telefone" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-top-color="black" border-top-style="solid" border-top-width="thin" number-columns-spanned="4" />
|
||||
</fo:table-row>
|
||||
<fo:table-row height="5pt">
|
||||
<fo:table-cell number-columns-spanned="4">
|
||||
<fo:block font-size="10pt" text-align="left" />
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="2pt">
|
||||
<fo:inline font-weight="bold">Assunto</fo:inline>
|
||||
/
|
||||
<fo:inline font-size="8pt">Subject:</fo:inline>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="assunto" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:table table-layout="fixed" width="100%" space-before="20pt">
|
||||
<fo:table-column column-width="50pt" />
|
||||
<fo:table-column column-width="170pt" />
|
||||
<fo:table-column column-width="50pt" />
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">Cliente:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="cliente" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">Local:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="local" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">Data:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="data-marcacao" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left" font-weight="bold">Hora:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block font-size="10pt" text-align="left">
|
||||
<xsl:value-of select="hora-marcacao" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="20pt">Exmos. Senhores,</fo:block>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="10pt">
|
||||
Informo que o
|
||||
<xsl:if test="numero-trabalhadores > 1">s</xsl:if>
|
||||
seguinte
|
||||
<xsl:if test="numero-trabalhadores > 1">s</xsl:if>
|
||||
colaborador
|
||||
<xsl:if test="numero-trabalhadores > 1">es</xsl:if>
|
||||
<xsl:if test="numero-trabalhadores > 1">irão</xsl:if>
|
||||
<xsl:if test="numero-trabalhadores = 1">irá</xsl:if>
|
||||
comparecer nas vossas instalações para colheita:
|
||||
</fo:block>
|
||||
<fo:table space-before="10pt">
|
||||
<fo:table-column column-width="200pt" />
|
||||
<fo:table-column />
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">NOME DO FUNCIONÁRIO</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" space-before="2pt">DATA_NASCIMENTO</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" font-weight="bold" text-align="center" space-before="2pt">PERFIL</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="trabalhador">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="left" space-before="2pt">
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="center" space-before="2pt">
|
||||
<xsl:value-of select="data-nascimento" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt" text-align="right" space-before="2pt">
|
||||
<xsl:value-of select="perfil" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<xsl:for-each select="perfil">
|
||||
<fo:block font-size="10pt" text-align="justify" space-before="10pt">
|
||||
<fo:inline font-weight="bold" text-decoration="underline">
|
||||
PERFIL
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:inline>
|
||||
:
|
||||
<xsl:for-each select="ecd">
|
||||
<xsl:if test="position() > 1">,</xsl:if>
|
||||
<xsl:value-of select="." />
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
</xsl:for-each>
|
||||
<fo:table space-before="20pt">
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="12pt" text-align="LEFT" space-before="2pt">AGRADEÇO QUE ESTA LISTAGEM NOS SEJA REENVIADA COM INDICAÇÃO DAS
|
||||
EVENTUAIS FALTAS OCORRIDAS</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="10pt">Sem outro assunto de momento, aproveitamos para apresentar os nossos melhores cumprimentos,</fo:block>
|
||||
<fo:block font-size="10pt" text-align="left" space-before="30pt">
|
||||
<xsl:value-of select="nome" />
|
||||
</fo:block>
|
||||
<fo:block id="endofdoc" />
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
@ -1,110 +1,94 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
|
||||
<xsl:template match="lista-presencas">
|
||||
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm">
|
||||
<fo:region-body margin-top="16pt" margin-bottom="12pt"/>
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<xsl:for-each select="presenca">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0" >
|
||||
<fo:block break-after="page" >
|
||||
<xsl:apply-templates select="." />
|
||||
</fo:block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise >
|
||||
<fo:block space-after="40pt">
|
||||
<xsl:apply-templates select="." />
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="presenca">
|
||||
<fo:table table-layout="fixed" width="100%">
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row height="350pt" >
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-size="14pt" font-weight="bold" space-after="4pt" space-before="8pt" padding-left="8pt">
|
||||
Realização de ECDs
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" padding-left="8pt">
|
||||
<xsl:value-of select="trabalhador" />
|
||||
</fo:block>
|
||||
<fo:block font-size="10pt" space-after="4pt" padding-left="8pt">
|
||||
( <xsl:value-of select="empresa" /> )
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="4pt" padding-left="8pt">
|
||||
data: <xsl:value-of select="data" />
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="8pt" padding-left="8pt">
|
||||
hora de entrada: __h__m
|
||||
</fo:block>
|
||||
<fo:block padding-left="8pt" padding-right="8pt" space-after="8pt">
|
||||
<fo:table>
|
||||
<fo:table-column column-width="200pt"/>
|
||||
<fo:table-column column-width="100pt"/>
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center" >
|
||||
ECD
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center" >
|
||||
Rúbrica
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center" >
|
||||
Motivo de não realização
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="ecd">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-size="10pt" >
|
||||
<xsl:value-of select="." />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-weight="bold" text-align="center" >
|
||||
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin" >
|
||||
<fo:block font-weight="bold" text-align="center" >
|
||||
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="8pt" padding-left="8pt">
|
||||
hora de saída: __h__m
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" padding-left="8pt">
|
||||
assinatura do trabalhador:________________________________________
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
<?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.1" exclude-result-prefixes="fo">
|
||||
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
|
||||
<xsl:template match="lista-presencas">
|
||||
<fo:root>
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm">
|
||||
<fo:region-body margin-top="16pt" margin-bottom="12pt" />
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
<fo:page-sequence master-reference="simpleA4">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<xsl:for-each select="presenca">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() mod 2 = 0">
|
||||
<fo:block break-after="page">
|
||||
<xsl:apply-templates select="." />
|
||||
</fo:block>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:block space-after="40pt">
|
||||
<xsl:apply-templates select="." />
|
||||
</fo:block>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
<xsl:template match="presenca">
|
||||
<fo:table table-layout="fixed" width="100%">
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row height="350pt">
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="14pt" font-weight="bold" space-after="4pt" space-before="8pt" padding-left="8pt">Realização de ECDs</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" padding-left="8pt">
|
||||
<xsl:value-of select="trabalhador" />
|
||||
</fo:block>
|
||||
<fo:block font-size="10pt" space-after="4pt" padding-left="8pt">
|
||||
(
|
||||
<xsl:value-of select="empresa" />
|
||||
)
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="4pt" padding-left="8pt">
|
||||
data:
|
||||
<xsl:value-of select="data" />
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="8pt" padding-left="8pt">hora de entrada: __h__m</fo:block>
|
||||
<fo:block padding-left="8pt" padding-right="8pt" space-after="8pt">
|
||||
<fo:table>
|
||||
<fo:table-column column-width="200pt" />
|
||||
<fo:table-column column-width="100pt" />
|
||||
<fo:table-column />
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center">ECD</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center">Rúbrica</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="12pt" font-weight="bold" text-align="center">Motivo de não realização</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:for-each select="ecd">
|
||||
<fo:table-row>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-size="10pt">
|
||||
<xsl:value-of select="." />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-weight="bold" text-align="center" />
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-color="black" border-style="solid" border-width="thin">
|
||||
<fo:block font-weight="bold" text-align="center" />
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:for-each>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" space-after="8pt" padding-left="8pt">hora de saída: __h__m</fo:block>
|
||||
<fo:block font-size="12pt" font-weight="bold" padding-left="8pt">assinatura do trabalhador:________________________________________</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* FOPCreator.java
|
||||
*
|
||||
* Created on 25 de Maio de 2005, 15:36
|
||||
*/
|
||||
|
||||
package siprp.util.fop;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
/**
|
||||
*
|
||||
* @author lflores
|
||||
*/
|
||||
public class FOPCreator
|
||||
{
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
private static FOPCreator fopCreator;
|
||||
|
||||
/** Creates a new instance of FOPPrinter */
|
||||
private FOPCreator()
|
||||
{
|
||||
}
|
||||
|
||||
public static FOPCreator getFOPCreator()
|
||||
{
|
||||
synchronized( LOCK )
|
||||
{
|
||||
if( fopCreator == null )
|
||||
{
|
||||
fopCreator = new FOPCreator();
|
||||
}
|
||||
}
|
||||
return fopCreator;
|
||||
}
|
||||
|
||||
|
||||
public void createFOfromXML( InputStream xml, InputStream xslt, OutputStream fo )
|
||||
throws IOException, TransformerException
|
||||
{
|
||||
try
|
||||
{
|
||||
TransformerFactory factory = TransformerFactory.newInstance();
|
||||
Transformer transformer = factory.newTransformer( new StreamSource( xslt ) );
|
||||
Source src = new StreamSource( xml );
|
||||
Result res = new StreamResult( fo );
|
||||
transformer.transform( src, res );
|
||||
}
|
||||
finally
|
||||
{
|
||||
fo.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,495 @@
|
||||
/*
|
||||
* FOPPrinter.java
|
||||
*
|
||||
* Created on 25 de Maio de 2005, 15:43
|
||||
*/
|
||||
|
||||
package siprp.util.fop;
|
||||
|
||||
import java.awt.print.Book;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import javax.print.Doc;
|
||||
import javax.print.DocFlavor;
|
||||
import javax.print.DocPrintJob;
|
||||
import javax.print.PrintException;
|
||||
import javax.print.PrintService;
|
||||
import javax.print.PrintServiceLookup;
|
||||
import javax.print.ServiceUI;
|
||||
import javax.print.SimpleDoc;
|
||||
import javax.print.attribute.DocAttributeSet;
|
||||
import javax.print.attribute.HashDocAttributeSet;
|
||||
import javax.print.attribute.HashPrintRequestAttributeSet;
|
||||
import javax.print.attribute.PrintRequestAttributeSet;
|
||||
import javax.print.attribute.standard.Sides;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.apache.fop.apps.FOUserAgent;
|
||||
import org.apache.fop.apps.Fop;
|
||||
import org.apache.fop.apps.FopFactory;
|
||||
import org.apache.fop.render.awt.AWTRenderer;
|
||||
|
||||
|
||||
/**
|
||||
* Utilities to preview and print FO files in form of generated .fo files
|
||||
*
|
||||
* @author lflores
|
||||
* @author João Neto
|
||||
*/
|
||||
public class FOPPrinter implements FOPPrinterConstants
|
||||
{
|
||||
public FopFactory getFopfactory()
|
||||
{
|
||||
return fopfactory;
|
||||
}
|
||||
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
// private final Translator translator = new SecureResourceBundle( null );
|
||||
|
||||
// private final AWTRenderer renderer = new AWTRenderer( translator );
|
||||
private final FopFactory fopfactory;
|
||||
private final FOUserAgent foUserAgent;
|
||||
private final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
private static final DocFlavor flavor = DocFlavor.SERVICE_FORMATTED.PAGEABLE;
|
||||
|
||||
private Transformer transformer = null;
|
||||
|
||||
private static File userConfig = null;
|
||||
|
||||
|
||||
public static File getUserConfig()
|
||||
{
|
||||
return userConfig;
|
||||
}
|
||||
|
||||
public static void setUserConfig(File userConfig)
|
||||
{
|
||||
FOPPrinter.userConfig = userConfig;
|
||||
}
|
||||
|
||||
private static FOPPrinter fopPrinter = null;
|
||||
|
||||
/** Creates a new instance of FOPPrinter */
|
||||
private FOPPrinter()
|
||||
{
|
||||
fopfactory = FopFactory.newInstance();
|
||||
if (userConfig != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
fopfactory.setUserConfig(userConfig);
|
||||
} catch (Exception e)
|
||||
{
|
||||
System.err.println("Ignoring invalid user config file");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
foUserAgent = new FOUserAgent(fopfactory);
|
||||
fopfactory.setStrictValidation(false);
|
||||
|
||||
// driver.setLogger( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
|
||||
}
|
||||
|
||||
public static FOPPrinter getFOPPrinter()
|
||||
{
|
||||
synchronized (LOCK)
|
||||
{
|
||||
if (fopPrinter == null)
|
||||
{
|
||||
fopPrinter = new FOPPrinter( );
|
||||
}
|
||||
}
|
||||
return fopPrinter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a .fo and prints it
|
||||
* @param xslFile
|
||||
* @param xmlBytes
|
||||
** @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param printerDialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void print(String xslFile, byte[] xmlBytes, boolean preview, boolean printerDialog ) throws Exception
|
||||
{
|
||||
InputStream input = getClass().getClassLoader().getResourceAsStream(xslFile);
|
||||
print(input, xmlBytes,preview,printerDialog);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a .fo and prints it
|
||||
* @param xslStream
|
||||
* @param xmlBytes
|
||||
** @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param printerDialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @throws Exception
|
||||
*/
|
||||
public void print(InputStream xslStream, byte[] xmlBytes, boolean preview, boolean printerDialog ) throws Exception
|
||||
{
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
FOPCreator.getFOPCreator().createFOfromXML(new ByteArrayInputStream(xmlBytes), xslStream, baos);
|
||||
printFO( new ByteArrayInputStream( baos.toByteArray() ), preview, printerDialog );
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a single .fo document.
|
||||
*
|
||||
* @param fo
|
||||
* The generated fo document
|
||||
* @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param dialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @throws Exception
|
||||
* if the conversion fails
|
||||
*/
|
||||
public void printFO(InputStream fo, boolean preview, boolean dialog) throws Exception
|
||||
{
|
||||
printFO(new InputStream[]
|
||||
{ fo }, preview, dialog);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints an array of .fo documents.
|
||||
*
|
||||
* @param fo
|
||||
* The array of generated fo documents
|
||||
* @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param dialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @throws Exception
|
||||
* if the conversion fails
|
||||
*/
|
||||
public void printFO(InputStream fo[], boolean preview, boolean dialog) throws Exception
|
||||
{
|
||||
printFO(fo, preview, dialog, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a single .fo document with printing options.
|
||||
*
|
||||
* @param fo
|
||||
* The generated fo document
|
||||
* @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param dialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @param options
|
||||
* Printing options
|
||||
* @see FOPPrinterConstants
|
||||
* @throws Exception
|
||||
* if the conversion fails
|
||||
*/
|
||||
public void printFO(InputStream fo, boolean preview, boolean dialog,
|
||||
Hashtable<Object, Serializable> options) throws Exception
|
||||
{
|
||||
printFO(new InputStream[]
|
||||
{ fo }, preview, dialog, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints an array of .fo documents with printing options.
|
||||
*
|
||||
* @param fo
|
||||
* The array of generated fo documents
|
||||
* @param preview
|
||||
* Flag to activate document preview before printing. If false,
|
||||
* the printing is immediately activated.
|
||||
* @param dialog
|
||||
* Flag to activate the printer choosing dialog. If false, the
|
||||
* default or preferred printer is used.
|
||||
* @param options
|
||||
* Printing options
|
||||
* @see FOPPrinterConstants
|
||||
* @throws Exception
|
||||
* if the conversion fails
|
||||
*/
|
||||
public void printFO(InputStream fo[], boolean preview, boolean dialog,
|
||||
Hashtable<Object, Serializable> options) throws Exception
|
||||
{
|
||||
if (options == null)
|
||||
{
|
||||
options = new Hashtable<Object, Serializable>();
|
||||
}
|
||||
String defaultPrinter = System.getProperty("evutils.defaultprinter");
|
||||
if (defaultPrinter != null)
|
||||
{
|
||||
options.put(FOP_PREFERRED_PRINTER_NAME, defaultPrinter);
|
||||
}
|
||||
if (fo.length > 1 && preview)
|
||||
{
|
||||
throw new Exception("Can't have preview with multi document print");
|
||||
}
|
||||
if (transformer == null)
|
||||
{
|
||||
transformer = factory.newTransformer();
|
||||
}
|
||||
// long tic = System.currentTimeMillis();
|
||||
|
||||
AWTRenderer renderer = new AWTRenderer();
|
||||
|
||||
foUserAgent.setRendererOverride(renderer);
|
||||
|
||||
if (!preview)
|
||||
{
|
||||
renderer.setPreviewDialogDisplayed(false);
|
||||
}
|
||||
renderer.setUserAgent(foUserAgent);
|
||||
|
||||
Result res[] = new Result[fo.length];
|
||||
for (int i = 0; i < fo.length; ++i)
|
||||
{
|
||||
Source src = new StreamSource(fo[i]);
|
||||
Fop fop = fopfactory.newFop(foUserAgent);
|
||||
res[i] = new SAXResult(fop.getDefaultHandler());
|
||||
transformer.transform(src, res[i]);
|
||||
}
|
||||
|
||||
if (!preview)
|
||||
{
|
||||
Book book = new Book();
|
||||
for (int i = 0; i < renderer.getNumberOfPages(); ++i)
|
||||
{
|
||||
book.append(renderer.getPrintable(i), renderer.getPageFormat(i));
|
||||
}
|
||||
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
|
||||
|
||||
PrintService service = chooseService(dialog, options, pras);
|
||||
if (service != null)
|
||||
{
|
||||
// PrintJobAttributeSet pjas = new HashPrintJobAttributeSet();
|
||||
DocAttributeSet das = new HashDocAttributeSet();
|
||||
// das.add( new NumberUp( 2 ) );
|
||||
Doc doc = new SimpleDoc(book, flavor, das);
|
||||
DocPrintJob job = service.createPrintJob();
|
||||
try
|
||||
{
|
||||
job.print(doc, pras);
|
||||
}
|
||||
catch (PrintException pe)
|
||||
{
|
||||
pe.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static PrintService chooseService(boolean dialog, Hashtable<Object, Serializable> options,
|
||||
PrintRequestAttributeSet pras)
|
||||
{
|
||||
if (options.containsKey(FOP_DUPLEX_TYPE))
|
||||
{
|
||||
pras.add((Sides) options.get(FOP_DUPLEX_TYPE));
|
||||
}
|
||||
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
|
||||
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
|
||||
|
||||
boolean hasMandatory = options.containsKey(FOP_MANDATORY_PRINTER_NAME);
|
||||
boolean hasPreferred = options.containsKey(FOP_PREFERRED_PRINTER_NAME);
|
||||
String mandatoryName = (String) options.get(FOP_MANDATORY_PRINTER_NAME);
|
||||
String preferredName = (String) options.get(FOP_PREFERRED_PRINTER_NAME);
|
||||
PrintService mandatory = null;
|
||||
PrintService preferred = null;
|
||||
|
||||
if (hasPreferred || hasMandatory)
|
||||
{
|
||||
for (int n = 0; n < printService.length; n++)
|
||||
{
|
||||
if (hasMandatory)
|
||||
{
|
||||
if (printService[n].getName().equals(mandatoryName))
|
||||
{
|
||||
mandatory = printService[n];
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (hasPreferred)
|
||||
{
|
||||
if (printService[n].getName().equals(preferredName))
|
||||
{
|
||||
preferred = printService[n];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// long toc = System.currentTimeMillis();
|
||||
// System.err.println( "PRINT FO INNER: " + ( toc - tic ) );
|
||||
PrintService service;
|
||||
if (!dialog && !hasMandatory && !hasPreferred)
|
||||
{
|
||||
service = defaultService;
|
||||
}
|
||||
else if (hasMandatory)
|
||||
{
|
||||
if (mandatory == null)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "A impressora " + mandatoryName
|
||||
+ " n\u00e3o est\u00e1 dispon\u00EDvel.", "Erro...",
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
service = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
service = mandatory;
|
||||
}
|
||||
}
|
||||
else if ((!dialog) && hasPreferred && preferred != null)
|
||||
{
|
||||
|
||||
// pras.add((Sides) options.get(FOP_DUPLEX_TYPE));
|
||||
service = preferred;
|
||||
|
||||
}
|
||||
else if (hasPreferred && preferred != null)
|
||||
{
|
||||
|
||||
// pras.add((Sides) options.get(FOP_DUPLEX_TYPE));
|
||||
service = ServiceUI.printDialog(null, 200, 200, printService, preferred, flavor, pras);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (printService == null || printService.length == 0)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null,
|
||||
"N\u00e3o existem impressoras dispon\u00edveis neste computador.", "Erro",
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
service = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
service = ServiceUI.printDialog(null, 200, 200, printService, defaultService,
|
||||
flavor, pras);
|
||||
}
|
||||
}
|
||||
return service;
|
||||
}
|
||||
|
||||
// private static PreviewDialog createPreviewDialog(FOUserAgent foUserAgent)
|
||||
// {
|
||||
// final PreviewDialog frame = new PreviewDialog(foUserAgent);
|
||||
// frame.validate();
|
||||
// frame.addWindowListener(new WindowAdapter()
|
||||
// {
|
||||
// public void windowClosed(WindowEvent we)
|
||||
// {
|
||||
// frame.setVisible(false);
|
||||
// }
|
||||
// });
|
||||
// // center window
|
||||
// Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
// frame.setSize(screenSize);
|
||||
// Dimension frameSize = frame.getSize();
|
||||
//
|
||||
// /*
|
||||
// * if( frameSize.height > screenSize.height ) { frameSize.height =
|
||||
// * screenSize.height; } if( frameSize.width > screenSize.width ) {
|
||||
// * frameSize.width = screenSize.width; }
|
||||
// */
|
||||
// frame.setLocation((screenSize.width - frameSize.width) / 2,
|
||||
// (screenSize.height - frameSize.height) / 2);
|
||||
// return frame;
|
||||
// }
|
||||
|
||||
// private PreviewDialog viewFO(InputStream fo) throws IOException,
|
||||
// FOPException,
|
||||
// TransformerException
|
||||
// {
|
||||
// PreviewDialog frame = createPreviewDialog(foUserAgent);
|
||||
// frame.setVisible(true);
|
||||
// // foUserAgent.getRendererOverride().s
|
||||
//
|
||||
//
|
||||
// renderer.setProgressListener(frame);
|
||||
// renderer.setComponent(frame);
|
||||
// frame.progress("A Preparar ...");
|
||||
// return frame;
|
||||
// }
|
||||
|
||||
public static void main(String arg[]) throws Exception
|
||||
{
|
||||
// PipedInputStream pis = new PipedInputStream();
|
||||
// final PipedOutputStream pos = new PipedOutputStream(pis);
|
||||
// final FOPCreator creator = FOPCreator.getFOPCreator();
|
||||
System.out.println("Creating FO");
|
||||
|
||||
// JFileChooser chooser = new JFileChooser();
|
||||
// chooser.setDialogTitle("Select XML data file:");
|
||||
// int returnVal = chooser.showOpenDialog(null);
|
||||
// String dataFile = null;
|
||||
// if (returnVal == JFileChooser.APPROVE_OPTION)
|
||||
// {
|
||||
// dataFile = chooser.getSelectedFile().getAbsolutePath();
|
||||
// }
|
||||
// chooser.setDialogTitle("Select XSL-FO template file:");
|
||||
// returnVal = chooser.showOpenDialog(null);
|
||||
// String templateFile = null;
|
||||
// if (returnVal == JFileChooser.APPROVE_OPTION)
|
||||
// {
|
||||
// templateFile = chooser.getSelectedFile().getAbsolutePath();
|
||||
// System.out.println(chooser.getSelectedFile().getAbsolutePath());
|
||||
// }
|
||||
|
||||
// final String DATA = dataFile;
|
||||
// final String TEMPLATE = templateFile;
|
||||
|
||||
// final String DATA = "/home/jneto/Desktop/boletim.xml";
|
||||
// final String TEMPLATE = "/home/jneto/Desktop/boletim.xsl";
|
||||
// Thread t = new Thread()
|
||||
// {
|
||||
// public void run()
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// creator.createFOfromXML(new FileInputStream(DATA),
|
||||
// new FileInputStream(TEMPLATE), pos);
|
||||
// System.out.println("FO created");
|
||||
// } catch (Exception ex)
|
||||
// {
|
||||
// ex.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// t.start();
|
||||
// t.wait(2);
|
||||
System.out.println("Starting to print");
|
||||
// Hashtable<Object, Serializable> options = new Hashtable<Object,
|
||||
// Serializable>();
|
||||
// options.put(FOP_DUPLEX_TYPE,
|
||||
// javax.print.attribute.standard.Sides.TUMBLE);
|
||||
// new FOPPrinter().printFO(pis, false, true, options);
|
||||
new FOPPrinter().printFO(new FileInputStream("/home/jneto/Desktop/carta1.fo"), true,
|
||||
true);
|
||||
System.out.println("DONE");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* FOPPrinterConstants.java
|
||||
*
|
||||
* Created on 14 de Junho de 2005, 14:49
|
||||
*/
|
||||
|
||||
package siprp.util.fop;
|
||||
|
||||
/**
|
||||
* FOP Printer options
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public interface FOPPrinterConstants
|
||||
{
|
||||
public static final Object FOP_PREFERRED_PRINTER_NAME = new Integer( 1 );
|
||||
public static final Object FOP_MANDATORY_PRINTER_NAME = new Integer( 2 );
|
||||
public static final Object FOP_DUPLEX_TYPE = new Integer( 3 );
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package siprp.util.fop;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
|
||||
public class Main
|
||||
{
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
File userConfigFile = new File("/home/jneto/fopConf.xml");
|
||||
FOPPrinter.setUserConfig(userConfigFile);
|
||||
FOPPrinter fp = FOPPrinter.getFOPPrinter();
|
||||
System.out.println(fp.getFopfactory().getFontBaseURL());
|
||||
fp.printFO(new FileInputStream("/home/jneto/test.fo"), true, true);
|
||||
|
||||
|
||||
} catch (FileNotFoundException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (Exception e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,191 @@
|
||||
/*
|
||||
* PDFCreator.java
|
||||
*
|
||||
* Created on 19 de Abril de 2006, 18:20
|
||||
*
|
||||
* To change this template, choose Tools | Template Manager
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package siprp.util.fop;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.apache.fop.apps.FOUserAgent;
|
||||
import org.apache.fop.apps.Fop;
|
||||
import org.apache.fop.apps.FopFactory;
|
||||
import org.apache.xmlgraphics.util.MimeConstants;
|
||||
|
||||
import com.evolute.utils.fop.FOPCreator;
|
||||
|
||||
/**
|
||||
* PDFCreator creates PDF's using FO.
|
||||
*
|
||||
* @author Frederico Palma
|
||||
* @author João Neto
|
||||
* @version %I%, %G%
|
||||
*/
|
||||
public class PDFCreator
|
||||
{
|
||||
// private final Translator translator = new SecureResourceBundle( null );
|
||||
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
private static PDFCreator pdfCreator;
|
||||
FopFactory fopFactory;
|
||||
|
||||
private static File userConfig;
|
||||
|
||||
|
||||
public static PDFCreator getPDFCreator()
|
||||
{
|
||||
synchronized (LOCK)
|
||||
{
|
||||
if (pdfCreator == null)
|
||||
{
|
||||
pdfCreator = new PDFCreator();
|
||||
}
|
||||
}
|
||||
return pdfCreator;
|
||||
}
|
||||
|
||||
public static File getUserConfig()
|
||||
{
|
||||
return userConfig;
|
||||
}
|
||||
|
||||
public static void setUserConfig(File userConfig)
|
||||
{
|
||||
PDFCreator.userConfig = userConfig;
|
||||
}
|
||||
|
||||
public static void main(String arg[]) throws Exception
|
||||
{
|
||||
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
final FOPCreator creator = FOPCreator.getFOPCreator();
|
||||
System.out.println("Creating FO");
|
||||
|
||||
JFileChooser chooser = new JFileChooser();
|
||||
chooser.setDialogTitle("Select XML data file:");
|
||||
int returnVal = chooser.showOpenDialog(null);
|
||||
String dataFile = null;
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION)
|
||||
{
|
||||
dataFile = chooser.getSelectedFile().getAbsolutePath();
|
||||
}
|
||||
chooser.setDialogTitle("Select XSL-FO template file:");
|
||||
returnVal = chooser.showOpenDialog(null);
|
||||
String templateFile = null;
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION)
|
||||
{
|
||||
templateFile = chooser.getSelectedFile().getAbsolutePath();
|
||||
System.out.println(chooser.getSelectedFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
final String DATA = dataFile;
|
||||
final String TEMPLATE = templateFile;
|
||||
creator.createFOfromXML(new FileInputStream(DATA), new FileInputStream(TEMPLATE), baos);
|
||||
// Thread t = new Thread() {
|
||||
// public void run()
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// creator.createFOfromXML( new FileInputStream( DATA ),
|
||||
// new FileInputStream( TEMPLATE ), baos );
|
||||
// System.out.println( "FO created" );
|
||||
// }
|
||||
// catch( Exception ex )
|
||||
// {
|
||||
// ex.printStackTrace();
|
||||
// }
|
||||
// } };
|
||||
// t.start();
|
||||
// Thread.currentThread().sleep( 2 );
|
||||
System.out.println("Starting to print");
|
||||
// options.put( FOP_DUPLEX_TYPE,
|
||||
// javax.print.attribute.standard.Sides.TUMBLE );
|
||||
byte pdf[] = PDFCreator.getPDFCreator().createPdfFromFo(baos.toByteArray());
|
||||
// new FOPPrinter().printFO( new FileInputStream( "c:\\simplecol.fo" ),
|
||||
// true, false );
|
||||
File pdfFile = new File("/home/jneto/Desktop/teste.pdf");
|
||||
File foFile = new File("/home/jneto/Desktop/teste.fo");
|
||||
pdfFile.createNewFile();
|
||||
foFile.createNewFile();
|
||||
FileOutputStream fos = new FileOutputStream(pdfFile);
|
||||
FileOutputStream fofos = new FileOutputStream(foFile);
|
||||
fos.write(pdf);
|
||||
fofos.write(baos.toByteArray());
|
||||
fos.close();
|
||||
fofos.close();
|
||||
System.out.println("DONE");
|
||||
}
|
||||
|
||||
// /** Creates a new instance of PDFCreator */
|
||||
// private PDFCreator()
|
||||
// {
|
||||
// fopFactory = FopFactory.newInstance();
|
||||
// }
|
||||
|
||||
/** Creates a new instance of PDFCreator */
|
||||
private PDFCreator()
|
||||
{
|
||||
fopFactory = FopFactory.newInstance();
|
||||
if (userConfig != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
fopFactory.setUserConfig(userConfig);
|
||||
} catch (Exception e)
|
||||
{
|
||||
System.err.println("Ignoring invalid user config file");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates PDF content as an array of bytes, given FO content as an array of
|
||||
* bytes.
|
||||
*
|
||||
* @param fo
|
||||
* the byte[] with the FO content to convert
|
||||
* @return the PDF content
|
||||
* @throws Exception
|
||||
* if the conversion fails
|
||||
*
|
||||
*/
|
||||
public byte[] createPdfFromFo(byte[] fo) throws Exception
|
||||
{
|
||||
|
||||
fopFactory.setStrictValidation(false);
|
||||
|
||||
ByteArrayOutputStream pdf = new ByteArrayOutputStream();
|
||||
TransformerFactory factory = TransformerFactory.newInstance();
|
||||
Transformer transformer = factory.newTransformer();
|
||||
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
|
||||
|
||||
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, pdf);
|
||||
|
||||
Source src = new StreamSource(new ByteArrayInputStream(fo));
|
||||
Result res = new SAXResult(fop.getDefaultHandler());
|
||||
|
||||
transformer.transform(src, res);
|
||||
|
||||
return pdf.toByteArray();
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,162 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- $Id: fop.xconf 447325 2006-09-18 08:55:33Z jeremias $ -->
|
||||
|
||||
<!--
|
||||
|
||||
This is an example configuration file for FOP.
|
||||
This file contains the same settings as the default values
|
||||
and will have no effect if used unchanged.
|
||||
|
||||
Relative config url's will be resolved relative to
|
||||
the location of this file.
|
||||
|
||||
-->
|
||||
|
||||
<!-- NOTE: This is the version of the configuration -->
|
||||
<fop version="1.0">
|
||||
|
||||
<strict-validation>false</strict-validation>
|
||||
|
||||
|
||||
<!-- Base URL for resolving relative URLs -->
|
||||
<base>.</base>
|
||||
|
||||
<!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
|
||||
<source-resolution>72</source-resolution>
|
||||
<!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
|
||||
<target-resolution>72</target-resolution>
|
||||
|
||||
<!-- Default page-height and page-width, in case
|
||||
value is specified as auto -->
|
||||
<default-page-settings height="11in" width="8.26in"/>
|
||||
|
||||
<!-- Information for specific renderers -->
|
||||
<!-- Uses renderer mime type for renderers -->
|
||||
<renderers>
|
||||
<renderer mime="application/pdf">
|
||||
<filterList>
|
||||
<!-- provides compression using zlib flate (default is on) -->
|
||||
<value>flate</value>
|
||||
|
||||
<!-- encodes binary data into printable ascii characters (default off)
|
||||
This provides about a 4:5 expansion of data size -->
|
||||
<!-- <value>ascii-85</value> -->
|
||||
|
||||
<!-- encodes binary data with hex representation (default off)
|
||||
This filter is not recommended as it doubles the data size -->
|
||||
<!-- <value>ascii-hex</value> -->
|
||||
</filterList>
|
||||
|
||||
<fonts>
|
||||
<!-- embedded fonts -->
|
||||
<!--
|
||||
This information must exactly match the font specified
|
||||
in the fo file. Otherwise it will use a default font.
|
||||
|
||||
For example,
|
||||
<fo:inline font-family="Arial" font-weight="bold" font-style="normal">
|
||||
Arial-normal-normal font
|
||||
</fo:inline>
|
||||
for the font triplet specified by:
|
||||
<font-triplet name="Arial" style="normal" weight="bold"/>
|
||||
|
||||
If you do not want to embed the font in the pdf document
|
||||
then do not include the "embed-url" attribute.
|
||||
The font will be needed where the document is viewed
|
||||
for it to be displayed properly.
|
||||
|
||||
possible styles: normal | italic | oblique | backslant
|
||||
possible weights: normal | bold | 100 | 200 | 300 | 400
|
||||
| 500 | 600 | 700 | 800 | 900
|
||||
(normal = 400, bold = 700)
|
||||
-->
|
||||
|
||||
<!--
|
||||
<font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
|
||||
<font-triplet name="Arial" style="normal" weight="normal"/>
|
||||
<font-triplet name="ArialMT" style="normal" weight="normal"/>
|
||||
</font>
|
||||
<font metrics-url="arialb.xml" kerning="yes" embed-url="arialb.ttf">
|
||||
<font-triplet name="Arial" style="normal" weight="bold"/>
|
||||
<font-triplet name="ArialMT" style="normal" weight="bold"/>
|
||||
</font>
|
||||
-->
|
||||
|
||||
<auto-detect/>
|
||||
</fonts>
|
||||
|
||||
<!-- This option lets you specify additional options on an XML handler -->
|
||||
<!--xml-handler namespace="http://www.w3.org/2000/svg">
|
||||
<stroke-text>false</stroke-text>
|
||||
</xml-handler-->
|
||||
|
||||
</renderer>
|
||||
|
||||
<renderer mime="application/postscript">
|
||||
<!-- This option forces the PS renderer to rotate landscape pages -->
|
||||
<!--auto-rotate-landscape>true</auto-rotate-landscape-->
|
||||
|
||||
<!-- This option lets you specify additional options on an XML handler -->
|
||||
<!--xml-handler namespace="http://www.w3.org/2000/svg">
|
||||
<stroke-text>false</stroke-text>
|
||||
</xml-handler-->
|
||||
</renderer>
|
||||
|
||||
<renderer mime="application/vnd.hp-PCL">
|
||||
</renderer>
|
||||
|
||||
<!-- MIF does not have a renderer
|
||||
<renderer mime="application/vnd.mif">
|
||||
</renderer>
|
||||
-->
|
||||
|
||||
<renderer mime="image/svg+xml">
|
||||
<format type="paginated"/>
|
||||
<link value="true"/>
|
||||
<strokeText value="false"/>
|
||||
</renderer>
|
||||
|
||||
<renderer mime="application/awt">
|
||||
</renderer>
|
||||
|
||||
<renderer mime="image/png">
|
||||
<!--transparent-page-background>true</transparent-page-background-->
|
||||
</renderer>
|
||||
|
||||
<renderer mime="image/tiff">
|
||||
<!--transparent-page-background>true</transparent-page-background-->
|
||||
<!--compression>CCITT T.6</compression-->
|
||||
</renderer>
|
||||
|
||||
<renderer mime="text/xml">
|
||||
</renderer>
|
||||
|
||||
<!-- RTF does not have a renderer
|
||||
<renderer mime="text/rtf">
|
||||
</renderer>
|
||||
-->
|
||||
|
||||
<renderer mime="text/plain">
|
||||
<pageSize columns="80"/>
|
||||
</renderer>
|
||||
|
||||
</renderers>
|
||||
|
||||
</fop>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue