Bug 56011

Summary: docbook2rtf produces bad rtf
Product: [Retired] Red Hat Linux Reporter: Will Backman <whb>
Component: docbook-utilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-14 17:18:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
sample docbook that fails to create rtf
none
margin.dsl none

Description Will Backman 2001-11-10 16:58:26 UTC
From Bugzilla Helper:

User-Agent: Mozilla/4.0 (compatible; MSIE 5.1b1; Mac_PowerPC)



Description of problem:

when converting docbook to pdf, ps, rtf, the export to rtf always 
produces a mangled rtf file.  Abiword fails to load it, and MS 
Word2000 opens it, but with one line per page.



Version-Release number of selected component (if applicable):





How reproducible:

Always



Steps to Reproduce:

1. create docbook file

2. run "docbook2rtf [file]"

3. open file in favorite word processor

	



Actual Results:  Abiword says it is an invalid file



Expected Results:  I should have seen output similar to my postscript 
and pdf



Additional info:



I noticed this in RedHat Linux 7.1.  Hoped 7.2 would fix it.

Nope.



This is important to me, as I am trying to move our comapny away 
from Word doc format.  My docbooks need to be exportable to a form 
that the "suits" can open in Word and modify.

Comment 1 Tim Waugh 2001-11-10 17:31:13 UTC
Which stylesheet are you using?  I thought this was fixed already when bug 
#49677 got closed.


Comment 2 Tim Waugh 2001-11-12 11:20:47 UTC
Can you give me an example document that renders badly for you?

By the way, I don't think AbiWord's RTF filter is very resilient..


Comment 3 Will Backman 2001-11-12 14:45:34 UTC
Created attachment 37265 [details]
sample docbook that fails to create rtf

Comment 4 Will Backman 2001-11-12 14:50:37 UTC
I don't know what stytle sheet I am usung.  I just create the docbook file and
then run the "stadard" tool, docbook2rtf.  I guess I am getting the defaults.

Comment 5 Tim Waugh 2001-11-12 15:06:46 UTC
Okay, here's what I see when I view the RTF in Ted (a GPL RTF editor):

Page i, book title, "IS Operations Manual".
Page ii blank except for header.
Page iii, table of contents showing the chapter and its two sections.
Page 1 then looks like this:

Chapter 1. Guiding Principals

Organizational Goals
  This is a test paragraph under this section of this chapter. [etc]

Departmental Goals
  This is another paragraph [etc]

AbiWord unsurprisingly doesn't import the RTF file correctly (AbiWord is bad 
at RTF as far as I understand it).  Do I need to view the RTF file in Word 
2000 to see the problem?

Another thing to try is 'docbook2rtf -d none ...'.  Let me know if that 
produces any better RTF output.


Comment 6 Will Backman 2001-11-12 21:13:18 UTC
docbook2rtf -d none ... fixes it.
Without that "-d none", MS Word2000 showed all the pages with text starting half
way down the page.  Is this a bug, or just a different setting.  Your call I guess.

Comment 7 Tim Waugh 2001-11-12 22:18:01 UTC
Sounds like a page margins problem in the stylesheet.  BUT, those margins work 
fine for non-RTF output.  Perhaps it's an openjade RTF backend bug.  I'll need 
to investigate a bit further.  Thanks for the feedback.


Comment 8 Tim Waugh 2001-11-12 22:48:33 UTC
Okay, the last work-around in this area involved tweaking the %bottom-margin%; 
this problem seems to be related to the %top-margin%.

I will attach a modified stylesheet that I'd like you to try.  Save it as 
'margin.dsl', and use 'docbook2rtf -d margin.dsl ...' to try it out.  Let me 
know if that corrects the problem.

Thanks.


Comment 9 Tim Waugh 2001-11-12 22:48:58 UTC
Created attachment 37322 [details]
margin.dsl

Comment 10 Will Backman 2001-11-14 17:15:13 UTC
The new margins.dsl produced rtf that MSWord2000 liked.  It did produce an error
during compile, though.
I ran "docbook2rtf -d margin.dsl secpol.docbook"
Error was:
jade:margin.dsl:510:2:E: too many arguments for function

Comment 11 Tim Waugh 2001-11-14 17:18:07 UTC
Okay, great.  Yes, the error that you saw was my fault, oops.



Comment 12 Tim Waugh 2001-11-17 14:21:51 UTC
Fixed in docbook-utils 0.6.9-9.