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 Cheri Dennison <ch...@amazon.com> on 2008/08/27 05:09:08 UTC

FOP 0.95: Code lines that no longer wrap

Howdy!
I'm upgrading to FOP 0.95 from 0.20.5 and from 1.70.1 to 1.74 for the
DocBook stylesheets. 

I’ve noticed that in my PDF output, *some* (but not all) of the long code
lines (inside a DocBook <programlisting> tag) that have NO spaces in them no
longer wrap and just keep going off the page. With the old FOP and
stylesheets, all the long lines in <programlistings> wrapped, just not
necessarily in a spot that made any sense. Now, just some of the lines don’t
wrap. Or a small amount of the text wraps onto a second line, but then
there’s a third line that just keeps going off the page (strange?). We don’t
want to manually break the lines, because we want them to be unbroken in our
HTML output (so folks can copy/paste the code and have it work). 

I’m using FOP 0.95, Saxon 6.5.5, and Xerces 2.8.0. I'm assuming the DocBook
hyphenate.verbatim is not supported by FOP yet. I've tried digging through
Bugzilla to find FOP bugs related to this, but I can't tell if the ones that
are open and related to wrapping are related to what I'm seeing. 

Anyone have any thoughts on what's happening? 
thanks a million!!
cheri 
-- 
View this message in context: http://www.nabble.com/FOP-0.95%3A-Code-lines-that-no-longer-wrap-tp19174028p19174028.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP 0.95: Code lines that no longer wrap

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 29, 2008, at 17:52, Cheri Dennison wrote:

Hi

>
> Attached is the FO file (
> http://www.nabble.com/file/p19222600/book.xml_fo_with_problem.xml
> book.xml_fo_with_problem.xml ) and a PDF showing the two offending  
> lines
> that used to wrap correctly with the old FOP and DB stylesheets (
> http://www.nabble.com/file/p19222600/fop_testing_wrap_test.pdf
> fop_testing_wrap_test.pdf ).
>
> The first line is on Adobe page 19, and the second is on Adobe page  
> 34.

AFAIU, this is a known 'issue'. (see also: https://issues.apache.org/ 
bugzilla/show_bug.cgi?id=43474)
Issue-between-quotes because, in spite of the default value for wrap- 
option being "wrap", strictly speaking, this only indicates that the  
formatter MAY (not MUST) insert implicit line-breaks. The method by  
which those are determined is left up to the implementation. FOP uses  
Unicode TR#14 (see: http://unicode.org/reports/tr14/) as a reference,  
and there, a break between two arbitrary alphanumeric characters is  
not considered, unless the two are separated by a space (which can  
also be a zero-width space).

As long as no one finds the time/energy to implement real line- 
wrapping on top of that, the workaround is to customize the  
stylesheet to insert zero-width spaces at strategic positions in the  
uninterrupted strings that would not fit on a single line. FOP will  
then gladly use these as additional break-possibilities.


HTH!


Cheers

Andreas


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


Re: FOP 0.95: Code lines that no longer wrap

Posted by Cheri Dennison <ch...@amazon.com>.
Attached is the FO file (
http://www.nabble.com/file/p19222600/book.xml_fo_with_problem.xml
book.xml_fo_with_problem.xml ) and a PDF showing the two offending lines
that used to wrap correctly with the old FOP and DB stylesheets (
http://www.nabble.com/file/p19222600/fop_testing_wrap_test.pdf
fop_testing_wrap_test.pdf ).

The first line is on Adobe page 19, and the second is on Adobe page 34.

Much appreciated!
cheri

Jeremias Maerki-2 wrote:
> 
> If you post an FO file (not DocBook) that demonstrates a problem I'll
> gladly take a look.
> 
> On 27.08.2008 05:09:08 Cheri Dennison wrote:
>> 
>> Howdy!
>> I'm upgrading to FOP 0.95 from 0.20.5 and from 1.70.1 to 1.74 for the
>> DocBook stylesheets. 
>> 
>> I’ve noticed that in my PDF output, *some* (but not all) of the long code
>> lines (inside a DocBook <programlisting> tag) that have NO spaces in them
>> no
>> longer wrap and just keep going off the page. With the old FOP and
>> stylesheets, all the long lines in <programlistings> wrapped, just not
>> necessarily in a spot that made any sense. Now, just some of the lines
>> don’t
>> wrap. Or a small amount of the text wraps onto a second line, but then
>> there’s a third line that just keeps going off the page (strange?). We
>> don’t
>> want to manually break the lines, because we want them to be unbroken in
>> our
>> HTML output (so folks can copy/paste the code and have it work). 
>> 
>> I’m using FOP 0.95, Saxon 6.5.5, and Xerces 2.8.0. I'm assuming the
>> DocBook
>> hyphenate.verbatim is not supported by FOP yet. I've tried digging
>> through
>> Bugzilla to find FOP bugs related to this, but I can't tell if the ones
>> that
>> are open and related to wrapping are related to what I'm seeing. 
>> 
>> Anyone have any thoughts on what's happening? 
>> thanks a million!!
>> cheri 
>> -- 
>> View this message in context:
>> http://www.nabble.com/FOP-0.95%3A-Code-lines-that-no-longer-wrap-tp19174028p19174028.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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FOP-0.95%3A-Code-lines-that-no-longer-wrap-tp19174028p19222600.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP 0.95: Code lines that no longer wrap

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
If you post an FO file (not DocBook) that demonstrates a problem I'll
gladly take a look.

On 27.08.2008 05:09:08 Cheri Dennison wrote:
> 
> Howdy!
> I'm upgrading to FOP 0.95 from 0.20.5 and from 1.70.1 to 1.74 for the
> DocBook stylesheets. 
> 
> I’ve noticed that in my PDF output, *some* (but not all) of the long code
> lines (inside a DocBook <programlisting> tag) that have NO spaces in them no
> longer wrap and just keep going off the page. With the old FOP and
> stylesheets, all the long lines in <programlistings> wrapped, just not
> necessarily in a spot that made any sense. Now, just some of the lines don’t
> wrap. Or a small amount of the text wraps onto a second line, but then
> there’s a third line that just keeps going off the page (strange?). We don’t
> want to manually break the lines, because we want them to be unbroken in our
> HTML output (so folks can copy/paste the code and have it work). 
> 
> I’m using FOP 0.95, Saxon 6.5.5, and Xerces 2.8.0. I'm assuming the DocBook
> hyphenate.verbatim is not supported by FOP yet. I've tried digging through
> Bugzilla to find FOP bugs related to this, but I can't tell if the ones that
> are open and related to wrapping are related to what I'm seeing. 
> 
> Anyone have any thoughts on what's happening? 
> thanks a million!!
> cheri 
> -- 
> View this message in context: http://www.nabble.com/FOP-0.95%3A-Code-lines-that-no-longer-wrap-tp19174028p19174028.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