Word Perfect Help!

This is a discussion on Word Perfect Help! within the General Discussions forums, part of the Community Boards category; I'm writing a program that has to extract data from a variety of document formats (including odt, doc, docx, rtf, ...

  1. #1
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789

    Word Perfect Help!

    I'm writing a program that has to extract data from a variety of document formats (including odt, doc, docx, rtf, pdf, wps...etc) and I also need to write a module for a load of old Word Perfect documents.

    To test it I'm putting the same passage of text into a document of each type and checking if the results spat out from each module are the same. I've put the lords prayer in each as a quick test, but haven't got Word Perfect installed to save the file in the format with a "wpd" extension. Open Office, AbiWord and MS Word 2007 wont save down to this format so I'm rather stuck. Does anyone have an old copy of Word Perfect installed to enable them to save this text down and send it to me?

    The text is
    Our Father who art in heaven,
    hallowed be thy name.
    Thy kingdom come.
    Thy will be done
    on earth as it is in heaven.
    Give us this day our daily bread,
    and forgive us our trespasses,
    as we forgive those who trespass against us,
    and lead us not into temptation,
    but deliver us from evil.
    [The 1928 BCP adds:
    For thine is the kingdom,
    and the power, and the glory,
    for ever and ever.]
    Amen.
    Any help would be much appreciated

  2. #2
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    Can you use a newer version of the Word Perfect to do the trick? It looks like they have a free trial version on Corel's website.
    My Website

    "Circular logic is good because it is."

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    I'm sure you have tried but did you check over at wotsit.org to see if the file format is there?

    Does this help?
    http://www.wotsit.org/list.asp?page=2&fc=10&search=&al=

    Of course if you are testing your loading code then the format probably won't help since you need a document in the WordPerfect format. Does Word 2007 or something newer save files in the WordPerfect format? Perhaps OpenOffice Writer has a module that does?
    Last edited by VirtualAce; 06-16-2011 at 11:00 AM.

  4. #4
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,165
    O_o

    I've included the file, but I have a better suggestion for future tests.

    While "LibreOffice" will not naturally export "WPD" it will read "WPD". Once you get this pegged, you can test further examples by downloading any random "WPD" you come across and use "LibreOffice" to export the data to a format you already know you can read.

    Also, "libwpb" may not be the best, but they do have some of the poorly documented quirks.

    [Edit]
    Yes, it says that it is a text file, but it isn't. It is a standard "zip" file that contains the "WPD".
    [/Edit]

    Soma
    Attached Files Attached Files

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Phantomap - Excellent! Just what I wanted.

    >>Also, "libwpb" may not be the best, but they do have some of the poorly documented quirks.

    That's what I am using. I already use libwps (MS Works) which uses libwpd as its basis, and have a pretty good understanding of how to get the library to do what I need. Its actually one of the easier libraries I'm using.

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    When playing with legacy code I've always found Oldversions of Windows, Mac, Linux Software & Abandonware Games to be very useful...

  7. #7
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by adeyblue View Post
    What's that connecting to? A dialup connection? Really... It's been years since I've seen a site that slow...

  9. #9
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    611
    No idea. They do have Turbo C to componsate for that though, so while it might not be the best in the world at least I'm all set for my C programming career.
    Last edited by adeyblue; 06-16-2011 at 12:44 PM.

  10. #10
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,165
    O_o

    [Sarcasm]
    Yea, because adding the word "abandonware" to a website makes redistributing software without permission completely legal.
    [/Sarcasm]

    Anyway, no problem man; file formats are a fascination of mine.

    Soma

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    Yeah. Still, I'll confess to my little sin and admit I didn't resist getting a copy of Norton Commander.
    3.0. If I remember well, that was their best version. Cult stuff.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Hmm... Couldn't get Phantomap's file to parse - the library didn't like the format, so I tried DavidP's idea and downloaded a trial version, saved the file down and tried again - this worked fine and the data was parsed without a hiccup. Looking up the history of WP it seems like there are as many versions of the format as there are with Word's doc format.

    I guess I'll just have to try it out when its all coded and see. Each document parser is designed as a shared plugin so I can always go back and try another method and drop the library in at a later date if the method I'm using fails for a specific file format. Anyway, thanks guys...

  13. #13
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,165
    O_o

    Well, that's weird; I had already ran the file through the "libwpd" based "wpd_to_txt" scripts to double check that it had saved correctly when I posted it.

    So, you are driving "libwpd" through "libwps"? Perhaps "libwps" only works for "WPD" documents that "Microsoft Word" would have handled?

    *shrug*

    Or perhaps it is some quirk of the version? The version of the scripts I have are based on the older "0.7.1" version.

    [Edit]
    I doubt that is it. I just tried a newer version. It worked fine.
    [/Edit]

    Soma

  14. #14
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Quote Originally Posted by phantomotap View Post
    O_o

    Well, that's weird; I had already ran the file through the "libwpd" based "wpd_to_txt" scripts to double check that it had saved correctly when I posted it.

    So, you are driving "libwpd" through "libwps"? Perhaps "libwps" only works for "WPD" documents that "Microsoft Word" would have handled?

    *shrug*

    Or perhaps it is some quirk of the version? The version of the scripts I have are based on the older "0.7.1" version.

    [Edit]
    I doubt that is it. I just tried a newer version. It worked fine.
    [/Edit]

    Soma
    No libwps is a different library. It just bases its interface on libwpd

    Perhaps I need to revisit my code then. I took the functionality from one of the conversion examples in the tarball. One thing that worries me is that the libraries I link to are part of the official ubuntu repos, but the example was from a downloaded tarball (ubuntu often strips the examples and source from the deb files). I always try to get exactly the same version when I download, but perhaps I made an error doing this...
    I'll revisit it, but to be honest I have lots of quirks to iron out before really doing any of the coding relating to what I actually want to do with the data once its extracted.

  15. #15
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,165
    *shrug*

    Poorly documented third-party file formats (lots of "WPD" quirks) are always a pain.

    Well, good luck at anyways.

    Soma

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading text-and-numbers file word by word
    By bored_guy in forum C Programming
    Replies: 22
    Last Post: 10-26-2009, 10:59 PM
  2. Dirty Word (Microsoft Word that is, you sicko!)
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 07-02-2005, 07:27 AM
  3. Replies: 3
    Last Post: 02-08-2005, 03:15 PM
  4. open file, search of word, replace word with another
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 06-05-2002, 01:16 PM
  5. Help reading text file word by word
    By Unregistered in forum C++ Programming
    Replies: 6
    Last Post: 05-25-2002, 05:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21