Hi Jimmy, thanks for the quick answer.
I think you got me wrong. We don't want to cut or wrap the string. We have to resize the font. The font-size must be altered to fit the string into the cell, so that the the string is neither bigger nor smaller then the cell. -----Ursprüngliche Nachricht----- Von: Jimmy Dixon [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 18. Mai 2006 10:15 An: fop-users@xmlgraphics.apache.org Betreff: Re: Scaling of Text this is a nasty one - basically the answer is no, if the value of the table cell is text the best you can do is to insert non breaking spaces between the letters t ensure it wraps and doesnt overflow. this template does the trick: <xsl:template name="zero-length-spaces"> <xsl:param name="string"/> <xsl:param name="len" select="string-length($string)"/> <xsl:choose> <xsl:when test="$len = 1"> <xsl:value-of select="$string"/><xsl:text>​</xsl:text> </xsl:when> <xsl:when test="$len = 0"> <xsl:text>-</xsl:text> </xsl:when> <xsl:otherwise> <xsl:call-template name="zero-length-spaces"> <xsl:with-param name="string" select="substring($string,1,floor($len div 2))"/> <xsl:with-param name="len" select="floor($len div 2)"/> </xsl:call-template> <xsl:call-template name="zero-length-spaces"> <xsl:with-param name="string" select="substring($string,floor($len div 2) + 1)"/> <xsl:with-param name="len" select="ceiling($len div 2)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> Kring, Rainer wrote: >We have a table-cell with a certain size defined by column-width and >table-row height (example below). Now we want to scale the xsl:value-of >output to maximum size of the cell. Is there any chances to get this >done with FOP 0.20.5? > >Thank you very much! >Rainer > > > ><fo:table-column column-width="238pt"/> > > ><fo:table-row height="94.0pt"> ><fo:table-cell> ></fo:table-cell> ><fo:table-cell border-bottom-style="solid" border-bottom-width="1.0pt" >border-left-style="solid" border-left-width="1.0pt" >border-right-style="solid" border-right-width="1.0pt" >border-top-style="solid" border-top-width="1.0pt" text-align="center" >display-align="before"> ><fo:block white-space-collapse="true" text-align="center" color="#ff0000" >font-family="Kerstin1" font-size="12.0pt"> <xsl:value-of >disable-output-escaping="no" select="price_outlet_entire"/> </fo:block> ></fo:table-cell> <fo:table-cell> </fo:table-cell> </fo:table-row> > > > Rainer Kring > IT Analyst Applications > mailto:[EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- Jimmy Dixon, Perfiliate Technologies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ email : [EMAIL PROTECTED] phone : +44 (0)191 241 6500 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Registered Office: Perfiliate Technologies Limited 7-15 Pink Lane, Newcastle upon Tyne. NE1 5DW Registered No. 3783384 in the UK Telephone +44 (0)191 241 6500 Facsimile +44 (0)191 241 9302 www.perfiliate.com Please note that electronic mail may be monitored. This e-mail is confidential. If you received it by mistake, please let us know and then delete it from your system; you should not copy, disclose, or distribute its contents to anyone nor act in reliance on this e-mail, as this is prohibited and may be unlawful. We check all emails for viruses, but please note that we do not accept liability for any viruses which may be transmitted in or with this email. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]