Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Word Perfect Files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
LeBrad
n00b
n00b


Joined: 28 May 2003
Posts: 7

PostPosted: Fri Apr 30, 2004 3:26 am    Post subject: Word Perfect Files Reply with quote

I'm looking for a program that can read Word Perfect files (aside from the obvious Word Perfect itself). I tried with Open Office, but I could not find the right filter to open it with.

Appreciate any help.
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Fri Apr 30, 2004 4:10 am    Post subject: Reply with quote

Try wpd2sxw. Last I checked it doesn't handle graphics or other embedded objects. But it worked well enough for me.
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Fri Apr 30, 2004 6:41 pm    Post subject: Reply with quote

Yes, wpd2sxw (recently added to portage) is nice, and libwpd has a filter that supposedly allows openoffice to read wordperfect files.
_________________
Me
Back to top
View user's profile Send private message
vbenares
Apprentice
Apprentice


Joined: 13 Aug 2003
Posts: 205

PostPosted: Thu Jun 03, 2004 12:00 am    Post subject: Reply with quote

Seems like some openoffice guru must have already come up with a better way of doing this, but I couldn't find it quickly. So I wrote a little perl script to wrap wpd2sxw. It takes the names of wpd files and generates sxw files. I make no claims that this is anything other than a bug-filled inept way of doing this. (Suggestions are welcome.)

Code:
#!/usr/bin/perl -w
use strict;

#copes with multiple filenames
#new file will have sxw suffix - otherwise same name as input

for my $input_file (split / (?=\/)/,join(' ',@ARGV)){   
   my $output_file = $input_file.'.sxw';                     
   $output_file =~ s/\.wpd\./\./;                                   
   print "input_file: $input_file\n";
   print "output_file: $output_file\n\n";
   system( "wpd2sxw \'$input_file\' \'$output_file\'"); 
}


I use gnome, so I associated this script with the WP file type -- actually, I associated the following command which incorporates the script with the wordperfect file type, so I can just choose the conversion function from the nautilus popup menu.

Code:
xterm -hold -fs 18  -e  '/home/vbenares/Perl Scripts/openoffice/wpd2sxw.pl'
Back to top
View user's profile Send private message
count_zero
Guru
Guru


Joined: 17 May 2004
Posts: 460
Location: Little Rock, Arkansas, USA

PostPosted: Sat Jun 19, 2004 1:28 pm    Post subject: Reply with quote

I've emerged the libwpd and recompiled Openoffice, but OO still doesn't seem to recognize the wpd format. Do I need to specify a USE flag or something during the install of OO?
_________________
"We must all hang together, or assuredly we shall all hang separately."
-Ben Franklin
Back to top
View user's profile Send private message
Squinky86
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 309
Location: Alabama, USA

PostPosted: Sat Jun 19, 2004 1:41 pm    Post subject: Reply with quote

count_zero wrote:
I've emerged the libwpd and recompiled Openoffice, but OO still doesn't seem to recognize the wpd format. Do I need to specify a USE flag or something during the install of OO?

No, the plugin for OO is a separate package (no ebuild for it (yet)). Look at "writerperfect" on the libwpd website (http://libwpd.sf.net/). Portage does, however, have wpd2sxw which will transfer your document into the .sxw type and edit it like that.
_________________
Me
Back to top
View user's profile Send private message
Naughtyus
Guru
Guru


Joined: 14 Jul 2002
Posts: 463
Location: Vancouver, BC

PostPosted: Fri Jul 30, 2004 11:16 pm    Post subject: Reply with quote

How would I edit your script so that it opens OpenOffice and the output file automatically?

vbenares wrote:
Seems like some openoffice guru must have already come up with a better way of doing this, but I couldn't find it quickly. So I wrote a little perl script to wrap wpd2sxw. It takes the names of wpd files and generates sxw files. I make no claims that this is anything other than a bug-filled inept way of doing this. (Suggestions are welcome.)

Code:
#!/usr/bin/perl -w
use strict;

#copes with multiple filenames
#new file will have sxw suffix - otherwise same name as input

for my $input_file (split / (?=\/)/,join(' ',@ARGV)){   
   my $output_file = $input_file.'.sxw';                     
   $output_file =~ s/\.wpd\./\./;                                   
   print "input_file: $input_file\n";
   print "output_file: $output_file\n\n";
   system( "wpd2sxw \'$input_file\' \'$output_file\'"); 
}


I use gnome, so I associated this script with the WP file type -- actually, I associated the following command which incorporates the script with the wordperfect file type, so I can just choose the conversion function from the nautilus popup menu.

Code:
xterm -hold -fs 18  -e  '/home/vbenares/Perl Scripts/openoffice/wpd2sxw.pl'
Back to top
View user's profile Send private message
Naughtyus
Guru
Guru


Joined: 14 Jul 2002
Posts: 463
Location: Vancouver, BC

PostPosted: Fri Jul 30, 2004 11:55 pm    Post subject: Reply with quote

Nevermind - I got it:

Code:
#!/usr/bin/perl -w
use strict;

#copes with multiple filenames
#new file will have sxw suffix - otherwise same name as input

for my $input_file (split / (?=\/)/,join(' ',@ARGV)){
   my $output_file = $input_file.'.sxw';
   $output_file =~ s/\.wpd\./\./;
   print "input_file: $input_file\n";
   print "output_file: $output_file\n\n";
   system( "wpd2sxw \'$input_file\' \'$output_file\'");
   system( "/usr/bin/xoowriter $output_file");
}


If you're like me, and you have many OLD files that end in .WPD as well as .wpd, and if you trust wpd2sxw, you can even have the script delete the old files:

Code:
#!/usr/bin/perl -w
use strict;

#copes with multiple filenames
#new file will have sxw suffix - otherwise same name as input

for my $input_file (split / (?=\/)/,join(' ',@ARGV)){
   my $output_file = $input_file.'.sxw';
   $output_file =~ s/\.wpd\./\./;
   $output_file =~ s/\.WPD\./\./;
   print "input_file: $input_file\n";
   print "output_file: $output_file\n\n";
   system( "wpd2sxw \'$input_file\' \'$output_file\'");
   system( "/usr/bin/xoowriter $output_file");
   system( "rm \'$input_file\'");
}
Back to top
View user's profile Send private message
guidedvision
n00b
n00b


Joined: 17 Aug 2004
Posts: 1

PostPosted: Tue Aug 17, 2004 1:47 pm    Post subject: Writer Perfect working! Reply with quote

I have finally got the writer perfect filters to work on Gentoo (and RH9 btw). Here are the steps. I hope they can help someone else.

This will allow you to do File->Open on a Word Perfect file and the file will just open for you (no choosing filter needed).

CLOSE ALL INSTANCES OF OOo
1. Install libgsf. Get the most up to date version you can find.
2. Install libwpd package.
3. Download and untar the latest writerperfect tgz file from http://libwpd.sf.net
3. If you do not have a JAVA sdk (ie. only the JRE) go to http://java.sun.com and download the latest SDK or get from portage.
4. Download and set up the OOo SDK. THIS IS NOT A BIG DEAL. Go to http://www.openoffice.org/dev_docs/source/sdk/index.html and download the one for Linux.
5. As root, extract the SDK. Then in that directory do ./configure. You will have to tell it the location of your OOo, your Java SDK, and other things. The last question asks about auto deployment - say YES.
6. Then run 'setsdkenv_unix' to get into the SDK prompt.
7. Change directories to the writerperfect directory. Run make. If you encounter errors early on, it might be because you need updated libgsf. As long as it makes the WriterPerfect.uno.zip file, you are fine. I never got it to copy properly at the end since I do -net installs and I think it looks only user installs. Exit the SDK prompt.
8. If it exits abnormally, manually copy the uno.zip file to your OOo directory under /share/uno_packages.
9. In your OOo directory under /program run 'pkgchk --shared'. This will register the filter properly for all users.
10. Start OOo and you should find you can open Word Perfect files.

*Note: If you have a single user install you may not need to do #8 and #9, or you may have to copy the uno.zip to your /user/uno_packages directory. I'm not sure if pkgchk --shared is then the correct way to register the filter - but you can try it.
Back to top
View user's profile Send private message
Naughtyus
Guru
Guru


Joined: 14 Jul 2002
Posts: 463
Location: Vancouver, BC

PostPosted: Wed Aug 25, 2004 6:24 am    Post subject: Reply with quote

No matter what I do, I end up with the following error when running 'make' in the writerperfect directory:

Code:
"/opt/Ximian-OpenOffice/program/pkgchk" -f "./LINUX.out/bin/WriterPerfect.uno.zip"
> error: /user/uno_packages cannot be made absolute!
> dying abnormally...
make: *** [LINUX.out/misc/WriterPerfect_register_component.flag] Error 1


Any thoughts?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum