xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: displaying empty rows for a table
Date Wed, 05 Nov 2008 17:17:13 GMT
NBSP is Unicode 0x0160, in Java:

from org.apache.fop.util.CharUtilities:

    /** non-breaking space */
    public static final char NBSPACE = '\u00A0';

Just add this character to the stream. If escaping is necessary, your
XML serializer should handle that for you.

BTW, instead of an NBSP, you can also just set an explicit height on the
table-cell or table-row and leave the block empty.

On 05.11.2008 16:46:31 JWang wrote:
> 
> Thanks for the reply. I did try to use nbsp but could not figure out how to
> do it in Java. If I put in &_#_x_0_0_A_0_; directly in the fo file, it
> works. But in my case I have to set the value using Java like this:
> object.setProperty("&_#_x_0_0_A_0_;"); // nbsp character is expanded with _
> to show in html
> The property is then retrieved to construct the .fo document. It becomes
> &_a_m_p_;_x_0_0_a_0_;.  The PDF displays literal &_#_x_0_0_A_0_; as is
> instead of treating it as nbsp. I guess I have to escape & in Java but I do
> not know how. Any ideas?
> 
> http://www.nabble.com/file/p20343217/source_empty_rows.xml
> source_empty_rows.xml 
> 
> I attached the source fo file here. Notice the third row is displayed fine
> if I put the nbsp character directly in fo file. 4th and 5th rows are empty
> rows.
> 
> Thanks for your help
> Jin
> 
> 
> Vincent Hennebert-2 wrote:
> > 
> > Hi,
> > 
> > JWang wrote:
> >> I have to display some empty rows for a table just to fill the spaces.
> >> FOP
> >> 0.20 works just fine. FOP 0.95 collapses the empty rows. I understand
> >> that
> >> 7.26.10 "empty-cells" is not yet implemented in FOP. I tried to use
> >> white-space="pre" and enter white spaces for some of the cells. That does
> >> work but it breaks other non-empty cells by keeping a table cell on one
> >> line
> >> instead of wrapping around when it is too long.  Any ideas?
> > 
> > Putting non-breaking spaces (&#x00A0;) in your cells might do the job.
> > Otherwise, can you please post a small FO file illustrating the problem?
> > That would help us understand your needs.
> > 
> > Thanks,
> > Vincent
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/displaying-empty-rows-for-a-table-tp20333146p20343217.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 



Jeremias Maerki


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


Mime
View raw message