Convert RTFD to Doc (without losing images)

Hello!

Is it possible to convert RTFD-format files to Microsoft Word (doc) format - without losing images?

I have a multitude of RTF and RTFD files. I want to be able to access the contents of these files on platforms other than OS X (eg: Windows).

RTFD is not supported outside OS X. I understand that since RTFD files are OS X Packages, they show up in Windows as a folder containing image files and an RTF file; since this is readable by windows, I’ve been told this should be good enough. I disagree, because its fiddly, incomplete and hack-like rather than simple, recognizable and practical like a .doc file.

Given that I can open an RTFD file, copy/paste it’s content (images and text) to a new blank Microsoft Word document and save it as .doc, it seems to me that I should be able to automate those steps into a drag-and-drop app using AppleScript or Automator.

I’ve Googled for a solution to this but no-one else is talking about it, with the exception of:

  • the command-line ‘textutil’ converter, but that creates ascii files that are necessarily stripped of all images
  • converting to HTML, but that creates more than a single file (an HTML file plus a folder containing the images)

Am I missing something really obvious?

I prefer to avoid PDF since the document and its content (images, text) would not be easily copy/pasted/edited like a proper native Word or Pages document. HTML is a problem for the same reasons as PDF plus the result would not be a single file.

A separate question but related: Is anyone aware of a ‘proper’ cross-platform document format which supports images as well as text?

Of course, I recognize that I may be forced to accept that nothing will fit my needs and I’ll have to settle for a lesser solution but its too early in the process to give up yet.

Many thanks!
Peter

I made a test.

Create a TextEdit document with embedded pictures
Save it as rtfd
Open the rtfd with Pages
Export as .doc

The pictures were correctly embedded in the resulting file. At least I saw no oddity when opening it with openOffice.

Yvan KOENIG (VALLAURIS, France) jeudi 7 mars 2013 17:17:01

Yvan Koenig,

Thanks for trying that! I really appreciate it!

I had successfully performed this manual process of converting an RTDF to DOC using Microsoft Word.

The news that the same is possible using Pages gives strength to the possibility of creating an automated stand-alone converter using Applescript or Automator, given that the conversion using Pages is accomplished using Apple’s own tools.

I’m hoping someone has already created a script for this process or a similar process which can be modified to suit my needs.

Thanks again!
peter

You can copy and paste text from text edit into word and save it as .doc. These actions could be done with AppleScript of course.

That would be Portable Document Format (PDF)

By the way? Maybe you can save the RTFD doc (or print it first) as PDF, and then convert the PDF to doc?

Haven’t tried it, but I would I my goal were like yours.


set p2d to path to desktop as text

set rtfd to p2d & "Sans titre.rtfd:"
set doc to p2d & "docFile.doc"
tell application "Pages"
	open rtfd
	save document 1 in doc
end tell

Yvan KOENIG (VALLAURIS, France) jeudi 7 mars 2013 18:31:19

Thank-you Yvan Koenig!

Wow! You are a wizard! That script worked perfectly!

Thank-you very much!
You rock the most!
-peter

No, just somebody driving Pages since the delivery of iWork '08 :wink:

Yvan KOENIG (VALLAURIS, France) jeudi 7 mars 2013 22:06:55