Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'convert WordPerfect directly to RTF' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
convert WordPerfect directly to RTF
Authored by: klktrk on Nov 25, '06 11:52:57AM
If you are using Tiger or later, you can modify the On My Command to this:
/usr/local/bin/wpd2html __OBJ_PATH__ > ~/.Trash/wpdpreview.html; /usr/bin/textutil -convert rtf ~/.Trash/wpdpreview.html; open -a "TextEdit" ~/.Trash/wpdpreview.rtf

N.B.: 1) I installed my custom wpd2html in /usr/local/bin; replace this path with whereever you've installed wpd2html. Just make sure you use the full path. 2) I put the preview files in the trash so I don't have to remember to trash them later.

Here's the full command plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">;
<plist version="1.0">
<string>/usr/local/bin/wpd2html </string>
<string> &gt; ~/.Trash/wpdpreview.html; /usr/bin/textutil -convert rtf ~/.Trash/wpdpreview.html; open -a "TextEdit" ~/.Trash/wpdpreview.rtf</string>
<string>View WordPerfect as RTF</string>
<string>Requires wpd2html. Submitted by Kristofer Widholm</string>

[ Reply to This | # ]
convert WordPerfect directly to RTF
Authored by: deef on Dec 13, '06 09:24:31AM

Hey, thanks for posting this. I had come up with more or less the same solution but hadn't posted.

Here's a bash script that can be run from the command line to convert WP files to rtfs. It assumes that wpd2html is installed and in your $PATH . Given filename.wpd it will create a new file filename.rtf . And it accepts multiple files as input so you can turn it loose on a whole directory.

# bash script to convert wordperfect files to rtfs

for filename in "$@"
do if [ -z "$filename" -o ! -e "$filename" ]
then echo "Bad filename: $filename"
exit 1

for filename in "$@"
#the actual conversion
wpd2html "$filename" > "$filename".html
textutil "$filename".html -convert rtf
rm -f "$filename".html

mv "$filename".rtf "$newName"

[ Reply to This | # ]