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 Ted Walker <te...@virtualrad.com> on 2009/06/26 15:13:36 UTC

RE: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840

Hi All - 

I've got an XSL FO that looks good to me, but the FOP processor seems to
be ignoring empty blocks and blocks with whitespace.

The output I desire I am trying to achieve is:
--------
Line 1

Line 2
-------

None of these following XSL FOs produce the desired result.  Am I
missing something, or is this a limitation of FOP?

1.
<fo:flow flow-name="xsl-region-body">
<fo:block border-top-style="solid" padding-top=".15in"
space-after=".2in" font-family="arial" font-size="12pt">
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 1 </fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve"></fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 2 </fo:block> </fo:block> </fo:flow>

2.
<fo:flow flow-name="xsl-region-body">
<fo:block border-top-style="solid" padding-top=".15in"
space-after=".2in" font-family="arial" font-size="12pt">
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 1 </fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve"> </fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 2 </fo:block> </fo:block> </fo:flow>

3.
<fo:flow flow-name="xsl-region-body">
<fo:block border-top-style="solid" padding-top=".15in"
space-after=".2in" font-family="arial" font-size="12pt">
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 1 </fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">&#x0A;</fo:block>
  <fo:block white-space-collapse="false" whitespace-treatment="preserve"
linefeed-treatment="preserve">Line 2 </fo:block> </fo:block> </fo:flow>

Thanks, 
Ted

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to which 
they are addressed. If you have received this email in error 
please notify the system manager. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.


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


Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840

Posted by Andreas Delmelle <an...@telenet.be>.
On 26 Jun 2009, at 15:28, Oscar Schoof wrote:

> use the non-breaking space &#160; instead of your &#x0A;

Alternatively, if you prefer the hex-code (as I personally do), you  
were probably looking for &#xA0;

Regards

Andreas

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


Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840

Posted by Oscar Schoof <O....@omegam.nl>.
Ted,

use the non-breaking space &#160; instead of your &#x0A;

Oscar


>   <fo:block white-space-collapse="false" whitespace-treatment="preserve"
> linefeed-treatment="preserve">&#x0A;</fo:block>
>
>
>   

DISCLAIMER
-------------------------------------------------------------------------
"Dit bericht en eventuele aangehechte bestanden zijn vertrouwelijk en
uitsluitend bestemd voor  de geadresseerde. Ongeautoriseerde verstrekking
of bekendmaking aan en gebruik door anderen  zijn niet toegestaan. Als u
dit bericht per vergissing hebt ontvangen wordt u verzocht dit onmiddellijk
aan de afzender te melden en het bericht van uw systemen te verwijderen.
De werkgever van de afzender kan niet garanderen dat de verzonden en/of
ontvangen informatie  juist is en aanvaardt geen aansprakelijkheid voor
schade die eruit kan voortvloeien."

"This message and any files transmitted with it may contain confidential
information and is  solely intended for the addressee(s). Any unauthorized
disclosure or actions taken in reliance  on it are forbidden. If you have
received this message in error, please delete it and notify  the sender.
The employer of the sender does not guarantee that the information sent
and/or  received is correct and does not accept any liability for damages
related thereto."
--------------------------------------------------------------------------
Omegam Laboratoria bv  -  Amsterdam  -  The Netherlands  -  KvK. 34215654
--------------------------------------------------------------------------

RE: Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)

Posted by Ted Walker <te...@virtualrad.com>.
Correct - 

Methods 2 and 3 (from my original post, a block with space and a block with &#x0A;) do create the intended output in PDF, but not when creating an RTF.

Unfortunately, if I use the non-breaking space (&#xA0;) in the FO, a visible character (Â) shows up in the RTF.  

Is the inability to create a blank line perhaps a known bug when using FOP to create RTF?  I've seen other posts from users that are creating RTF that don't mention this issue...

Thanks,
Ted

-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Tuesday, June 30, 2009 12:42 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)


Hi Ted

> FOP is bundled into another application I am using, and I'm not sure  
> of
> the version.  I'm looking into the FOP version.
>
> This didn't work for me, unfortunately:
> <fo:block
>   space-after.optimum="1.2em"
>   space-after.conditionality="retain"
>   space-after.precedence="force" />
>
> Should this work in all versions of FOP to create a blank line in an
> RTF?

Errm... no sorry, I was unaware that you're using RTF output. In that  
case, you're already using one of the later versions, so it should  
work for PDF output at least.

For RTF output, I'm not 100% sure, but it may just work if you fill  
the block with a non-breaking space, as Oscar suggested earlier.


HTH!

Andreas


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to which 
they are addressed. If you have received this email in error 
please notify the system manager. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.


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


Re: Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)

Posted by Andreas Delmelle <an...@telenet.be>.
Hi Ted

> FOP is bundled into another application I am using, and I'm not sure  
> of
> the version.  I'm looking into the FOP version.
>
> This didn't work for me, unfortunately:
> <fo:block
>   space-after.optimum="1.2em"
>   space-after.conditionality="retain"
>   space-after.precedence="force" />
>
> Should this work in all versions of FOP to create a blank line in an
> RTF?

Errm... no sorry, I was unaware that you're using RTF output. In that  
case, you're already using one of the later versions, so it should  
work for PDF output at least.

For RTF output, I'm not 100% sure, but it may just work if you fill  
the block with a non-breaking space, as Oscar suggested earlier.


HTH!

Andreas

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


RE: Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)

Posted by Ted Walker <te...@virtualrad.com>.
Hi Andreas - 

FOP is bundled into another application I am using, and I'm not sure of
the version.  I'm looking into the FOP version.

This didn't work for me, unfortunately:
<fo:block
   space-after.optimum="1.2em"
   space-after.conditionality="retain"
   space-after.precedence="force" />

Should this work in all versions of FOP to create a blank line in an
RTF?

Thanks, 
Ted


-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Friday, June 26, 2009 9:34 AM
To: fop-users@xmlgraphics.apache.org
Subject: Generating an empty line (was: Re: fop-users Digest 26 Jun 2009
10:01:24 -0000 Issue 1840)

On 26 Jun 2009, at 15:13, Ted Walker wrote:

Hi Ted

Ignore my earlier reply for the moment, as I just realized I was a bit  
too hasty there...

The most important question is: which FOP version are you using?
I sincerely hope you're not stuck on 0.20.x, since it is notoriously  
non-compliant in terms of respecting preserved linefeeds and white- 
space...

> I've got an XSL FO that looks good to me, but the FOP processor  
> seems to
> be ignoring empty blocks and blocks with whitespace.
>
> The output I desire I am trying to achieve is:
> --------
> Line 1
>
> Line 2
> -------
>
> None of these following XSL FOs produce the desired result.  Am I
> missing something, or is this a limitation of FOP?

Option 1. will definitely not produce the intended effect, but both 2.  
and 3. definitely work in FOP 0.95.

As a small correction: the property "whitespace-treatment" does not  
exist. It should be specified as "white-space-treatment". FOP 0.95  
will exit with a ValidationException (unless you're using relaxed  
validation, which is not recommended)

If you are using 0.20.x and cannot upgrade, the effect of an empty  
line can normally be generated like so:

<fo:block
   space-after.optimum="1.2em"
   space-after.conditionality="retain"
   space-after.precedence="force" />



HTH!

Andreas


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to which 
they are addressed. If you have received this email in error 
please notify the system manager. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.


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


Generating an empty line (was: Re: fop-users Digest 26 Jun 2009 10:01:24 -0000 Issue 1840)

Posted by Andreas Delmelle <an...@telenet.be>.
On 26 Jun 2009, at 15:13, Ted Walker wrote:

Hi Ted

Ignore my earlier reply for the moment, as I just realized I was a bit  
too hasty there...

The most important question is: which FOP version are you using?
I sincerely hope you're not stuck on 0.20.x, since it is notoriously  
non-compliant in terms of respecting preserved linefeeds and white- 
space...

> I've got an XSL FO that looks good to me, but the FOP processor  
> seems to
> be ignoring empty blocks and blocks with whitespace.
>
> The output I desire I am trying to achieve is:
> --------
> Line 1
>
> Line 2
> -------
>
> None of these following XSL FOs produce the desired result.  Am I
> missing something, or is this a limitation of FOP?

Option 1. will definitely not produce the intended effect, but both 2.  
and 3. definitely work in FOP 0.95.

As a small correction: the property "whitespace-treatment" does not  
exist. It should be specified as "white-space-treatment". FOP 0.95  
will exit with a ValidationException (unless you're using relaxed  
validation, which is not recommended)

If you are using 0.20.x and cannot upgrade, the effect of an empty  
line can normally be generated like so:

<fo:block
   space-after.optimum="1.2em"
   space-after.conditionality="retain"
   space-after.precedence="force" />



HTH!

Andreas

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