Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1680

RTF files don't work in TextEdit.app or Pages.app on the Mac

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.95
    • None
    • renderer/rtf
    • None
    • Operating System: Mac OS X 10.4
      Platform: PC
    • 47481

    Description

      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.

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            mw5300@gmail.com Mark Watson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: