Skip to content

Commit

Permalink
Merge pull request InseeFr#227 from BulotF/master
Browse files Browse the repository at this point in the history
improve pdf padding
  • Loading branch information
laurentC35 authored Sep 18, 2019
2 parents 2ad4dfc + 178dc19 commit adce1d3
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 32 deletions.
8 changes: 8 additions & 0 deletions src/main/resources/styles/style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@
<xsl:attribute name="border-color">black</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="padding-left">1mm</xsl:attribute>
<xsl:attribute name="padding-right">1mm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="data-cell">
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="border-color">black</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="padding">1mm</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="Line-drawing">
<xsl:attribute name="width">100%</xsl:attribute>
<xsl:attribute name="height">10mm</xsl:attribute>
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/xslt/outputs/pdf/models.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,11 @@
<xsl:param name="no-border" tunnel="yes"/>
<xsl:param name="languages" tunnel="yes"/>

<fo:table-cell text-align="left" border-color="black" border-style="solid" padding="1mm">
<fo:table-cell xsl:use-attribute-sets="data-cell">
<xsl:if test="$no-border = 'no-border'">
<xsl:attribute name="border">0mm</xsl:attribute>
<xsl:attribute name="padding">0mm</xsl:attribute>
<xsl:attribute name="padding-top">0mm</xsl:attribute>
<xsl:attribute name="padding-bottom">0mm</xsl:attribute>
</xsl:if>
<fo:block>
<xsl:apply-templates select="eno:child-fields($source-context)" mode="source">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

<!-- ZONE TITRE COURRIER -->
<fo:block-container absolute-position="absolute" left="1mm" top="38mm" width="78mm" height="6mm" overflow="hidden" font-size="10pt">
<fo:block line-height="10pt" font-weight="bold" text-align="center">ENVOI DE QUESTIONNAIRE SUIE A DEMANDE</fo:block>
<fo:block line-height="10pt" font-weight="bold" text-align="center">ENVOI DE QUESTIONNAIRE PAPIER</fo:block>
</fo:block-container>

<!-- ZONE CONTACT -->
Expand All @@ -112,7 +112,7 @@

</fo:block>
<fo:block margin-top="5mm" font-weight="bold">
Objet&#160;: Enquête statistique#if((${BddFrequence}!='annuelle') and (${BddFrequence}!='pluriannuelle') and (${BddFrequence}!='')) ${BddFrequence}#end ${BddLibelleLong}#if((${BddFrequence}!='annuelle') and (${BddFrequence}!='pluriannuelle') and (${BddPeriode}!='')) ${BddPeriode}#end ${BddAnneeReference}
Objet&#160;: Votre demande de questionnaire pour l'enquête statistique#if((${BddFrequence}!='annuelle') and (${BddFrequence}!='pluriannuelle') and (${BddFrequence}!='')) ${BddFrequence}#end ${BddLibelleLong}#if((${BddFrequence}!='annuelle') and (${BddFrequence}!='pluriannuelle') and (${BddPeriode}!='')) ${BddPeriode}#end ${BddAnneeReference}
</fo:block>
<fo:block font-weight="bold">
Ref.&#160;${BddRaisonSociale} (Votre ${BddLabelUniteEnquetee}&#160;: ${BddIdentifiantUniteEnquetee})
Expand Down
Loading

0 comments on commit adce1d3

Please sign in to comment.