Keeping whites space in blocks
I'm converting documents from XML and some have large gaps of white space which disappears when rendered by fop. I have a block such as Some Text But the resulting PDF has the text hard to the left margin as though the input was simply: Some Text I assume something is allowing pre-ceding white space to be removed, but I can see what. Cheers Kevin Pearcey
Re: Keeping whites space in blocks
Hi Kevin, By default whitespace is collapsed. As often there is a lot of excess whitespace in xml. if you use this property: white-space-collapse="false" it will not collapse the white space. On Thu, 2002-05-23 at 12:31, Kevin Pearcey wrote: > I'm converting documents from XML and some have large gaps of white space > which disappears when rendered by fop. I have a block such as > > Some Text > > But the resulting PDF has the text hard to the left margin as though the > input was simply: > > Some Text > > I assume something is allowing pre-ceding white space to be removed, but I > can see what. > > Cheers > > Kevin Pearcey
RE: Keeping whites space in blocks
> -Original Message- > From: Keiron Liddle [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 23, 2002 6:38 AM > To: [EMAIL PROTECTED] > Subject: Re: Keeping whites space in blocks > > By default whitespace is collapsed. As often there is a lot of excess > whitespace in xml. > if you use this property: > white-space-collapse="false" > > it will not collapse the white space. I noticed some different behavior from RenderX's XEP. While FOP will keep all spaces, when words wrap to the next line, the words are left justified. However, XEP will wrap the word to the next line and indent it one space. It looks horrible. Which product is correct in their interpretation of the spec? FOP: This is a sample sentence that keeps all spaces. XEP: This is a sample sentence that keeps all spaces.
Re: Keeping whites space in blocks
Scott Moore wrote: I noticed some different behavior from RenderX's XEP. While FOP will keep all spaces, when words wrap to the next line, the words are left justified. However, XEP will wrap the word to the next line and indent it one space. It looks horrible. Which product is correct in their interpretation of the spec? FOP: This is a sample sentence that keeps all spaces. XEP: This is a sample sentence that keeps all spaces. It depends on the context. FOP will not only keep spaces but also linefeesd it white-space-collapse is set to "false". This is not conformant. There is a property linefeed-treatment, wich defaults to treat-as-space, i.e. the linefeed is converted to a space. If the spaces already present in the source fill up the line, the linefeed could, in theory, present itself as space at the beginning of the next line. Because of this, XEP could be, well, "more correct". J.Pietschmann