You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by s-...@artefrance.fr on 2003/02/13 13:02:10 UTC

Writing top to bottom and controlling page break

Hello,

I need to write some text from the top to the bottom of the page to make a 
border... like that :

E
X
A
M
P
L
E

I wanted to use the "writing-mode" properties (Values: lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit) but 
I saw it was not implemented in the FOP API yet.

I finally managed to do that with an XSL transformation which output that 
:

<fo:block font-size="18pt" 
          font-family="Helvetica"
          font-style="normal"
          font-weight="bold"
          line-height="20pt"
          space-after.optimum="0pt"
          color="#A8A5A5"
          text-align="center"
          white-space-collapse="false">
  C
  U
  R
  R
  E
  N
  T
 
  A
  F
  F
  A
  I
  R
</fo:block>

I used the XPath text() function to do that :

<xsl:apply-templates select="RESUME/* | RESUME/text()" />
<xsl:template match="text()"><xsl:value-of select="." /></xsl:template>
<xsl:template match="BR | br"><fo:block>&#160;</fo:block></xsl:template>

I putted the <BR /> tags during the XML serialization of my datas.

Thanks to help me if you have better idea ! =)

Another question, I have to work those days on a new XSL:FO layout that 
must manage fine page break system.

Is there a better way for handling that than using the XSL string-length() and sum() with an xsl:if tag ? Maybe with the space-after properties ?

Again, if you have better idea on the way to manage that ! Your help would 
be appreciated here ! :)



--------------------------------------------------------------
Simon OUALID
--------------------------------------------------------------
ARTE FRANCE
Analyste Programmeur
s-oualid@artefrance.fr
Tél : 01.55.00.70.70
Fax : 01.55.00.73.89
--------------------------------------------------------------

Re: Writing top to bottom and controlling page break

Posted by Jeremias Maerki <de...@greenmail.ch>.
Have you considered using SVG to do something like that? I've done
similar things like that with SVG in the past.

On 13.02.2003 13:02:10 s-oualid wrote:
> Hello,
> 
> I need to write some text from the top to the bottom of the page to make a 
> border... like that :
> 
> E
> X
> A
> M
> P
> L
> E
> 
> I wanted to use the "writing-mode" properties (Values: lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit) but 
> I saw it was not implemented in the FOP API yet.
> 
> I finally managed to do that with an XSL transformation which output that 
> :
> 
> <fo:block font-size="18pt" 
>           font-family="Helvetica"
>           font-style="normal"
>           font-weight="bold"
>           line-height="20pt"
>           space-after.optimum="0pt"
>           color="#A8A5A5"
>           text-align="center"
>           white-space-collapse="false">
>   C
>   U
>   R
>   R
>   E
>   N
>   T
>  
>   A
>   F
>   F
>   A
>   I
>   R
> </fo:block>
> 
> I used the XPath text() function to do that :
> 
> <xsl:apply-templates select="RESUME/* | RESUME/text()" />
> <xsl:template match="text()"><xsl:value-of select="." /></xsl:template>
> <xsl:template match="BR | br"><fo:block>&#160;</fo:block></xsl:template>
> 
> I putted the <BR /> tags during the XML serialization of my datas.
> 
> Thanks to help me if you have better idea ! =)
> 
> Another question, I have to work those days on a new XSL:FO layout that 
> must manage fine page break system.
> 
> Is there a better way for handling that than using the XSL string-length() and sum() with an xsl:if tag ? Maybe with the space-after properties ?
> 
> Again, if you have better idea on the way to manage that ! Your help would 
> be appreciated here ! :)


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org