Bug 703489

Summary: FOP: Problems with Tables
Product: [openSUSE] openSUSE 11.4 Reporter: Tanja Roth <taroth>
Component: DocumentationAssignee: Thomas Schraitle <thomas.schraitle>
Status: RESOLVED UPSTREAM QA Contact: Karl Eichwalder <ke>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://issues.apache.org/bugzilla/show_bug.cgi?id=53089
Whiteboard:
Found By: Documentation Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 702276    
Attachments: HA Guide, built with FOP
HA Guide, built with XEP

Description Tanja Roth 2011-07-01 15:08:08 UTC
Created attachment 438024 [details]
HA Guide, built with FOP

+++ This bug was initially created as a clone of Bug #703482 +++

When building the HA Guide with FOP, I noticed the following issues for tables:

1. Text of columns is sometimes printed in overlapping fashion and thus unreadable, see for example Table 8.2 (p.130 in the electronic version of the PDF).

2. FOP does not seem to honor "color width" attributes set to tables (check the  column widths of the tables in the XEP-built version, that's a difference).

3. the topmost list item on p. 60 in the electronic version of the PDF (Table 4.2 continued) seems to be glued to the line of the table head (probably more of a layout issue of list item than of tables, but anyway)

Maybe the 1. problem is also related to missing hyphenation and/or to the 2. problem described above.
Comment 1 Tanja Roth 2011-07-01 15:08:42 UTC
Created attachment 438025 [details]
HA Guide, built with XEP
Comment 2 Tanja Roth 2011-07-18 12:50:52 UTC
Comment on attachment 438025 [details]
HA Guide, built with XEP

sorry, wrong attachment, see instead: https://bugzilla.novell.com/attachment.cgi?id=438015
Comment 3 Tanja Roth 2011-07-18 12:53:03 UTC
Again wrong, sorry, should be: https://bugzilla.novell.com/attachment.cgi?id=438018
Comment 4 Thomas Schraitle 2012-04-13 14:58:53 UTC
(In reply to comment #0)

> 1. Text of columns is sometimes printed in overlapping fashion and thus
> unreadable, see for example Table 8.2 (p.130 in the electronic version of the
> PDF).

After further investigation, this has nothing to do with the table code itself. It is a hyphenation problem. I guess, FOP's hyphenation algorithm doesn't hyphenate when it's an all upper-case word.

 
> 2. FOP does not seem to honor "column width" attributes set to tables (check the
>  column widths of the tables in the XEP-built version, that's a difference).

The column width is handled by XSLT, not by FOP. As such, FOP just gets an instruction "make this column 3cm wide" or "make this column 3 times wider than the first column." If the calculation of the column width would be broken, so would be the PDF built by XEP.

In the above table 8.2, I could successfully make the columns wider. 


> 3. the topmost list item on p. 60 in the electronic version of the PDF (Table
> 4.2 continued) seems to be glued to the line of the table head (probably more
> of a layout issue of list item than of tables, but anyway)

I touched the table code some weeks ago. This seems to be gone now.

 
> Maybe the 1. problem is also related to missing hyphenation and/or to the 2.
> problem described above.

I suspect, this is a "corner case" as all the characters in column 2 are upper-case. Maybe we have to add some "break here" hints. 

I will investigate that next week.
Comment 5 Thomas Schraitle 2012-04-16 14:25:53 UTC
(In reply to comment #4)

> After further investigation, this has nothing to do with the table code itself.
> It is a hyphenation problem. I guess, FOP's hyphenation algorithm doesn't
> hyphenate when it's an all upper-case word.

and:

> I suspect, this is a "corner case" as all the characters in column 2 are
> upper-case. Maybe we have to add some "break here" hints. 
> 
> I will investigate that next week.

After some investigation, a SOFT HYPHEN (U+00xAD) will do the trick. For example, the following word

  OCF_NOT_RUNNING

don't break in a narrow table column with FOP. However, just add soft hyphens add the respective positions:

  OCF_NOT_&#xad;RUNNING

I think I can close this bug. :)
Comment 6 Tanja Roth 2012-04-16 14:32:15 UTC
But that is just a work-around, not a real fix. Can you report this bug upstream (FOP-Bugzilla), please?
Comment 7 Thomas Schraitle 2012-04-17 07:41:34 UTC
Reported issue upstream (Apache FOP bug tracker).
Comment 8 Swamp Workflow Management 2012-06-25 15:08:43 UTC
openSUSE-RU-2012:0788-1: An update that has 8 recommended fixes can now be installed.

Category: recommended (low)
Bug References: 703489,706459,706464,706475,706479,708637,758401,763268
CVE References: 
Sources used:
openSUSE 12.1 (src):    daps-1.0.2-5.9, opensuse-manuals_ru-12.1.8762-3.6.1, suse-xsl-stylesheets-1.9.6.2-2.3