Bug 47481 - RTF files don't work in TextEdit.app or Pages.app on the Mac
Summary: RTF files don't work in TextEdit.app or Pages.app on the Mac
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: rtf (show other bugs)
Version: 0.95
Hardware: PC Mac OS X 10.4
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 09:22 UTC by Mark Watson
Modified: 2012-04-01 06:24 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Watson 2009-07-06 09:22:49 UTC
Generated RTF files from fop don't work on TextEdit.app or Pages.app. When I try to open them i get an error that says "The document “helloworld.rtf” could not be opened. The file is not in the right format. The file might be corrupted, truncated, or in a different format than you expect."

I edited the rtf and narrowed it down to the font declaration section.

FOP sample font declaration:
{\fonttbl; {
\f0 Arial}{
\f1 Symbol}{
\f2 Times New Roman}{
\f3 sans-serif}
}
(for a simple document)

TextEdit.app sample font declaration:
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}

The issue is the ";" after "fonttbl". When I change the FOP declaration to this it works fine in TextEdit.app:
{\fonttbl {
\f0 Arial}{
\f1 Symbol}{
\f2 Times New Roman}{
\f3 sans-serif}
}

I don't know anything about how the RTF spec works, so this may be different in larger documents.
Comment 1 Pavel Kysilka 2009-07-22 08:01:59 UTC
Already fixed. See bug #45606. Please close bug.
Comment 2 Mark Watson 2009-07-22 08:12:09 UTC
(In reply to comment #1)
> Already fixed. See bug #45606. Please close bug.

My bad, I guess I didn't test in the development version.
Comment 3 Glenn Adams 2012-04-01 06:24:55 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed