Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Running Linux but Exporting as MS Word?

by Ovid (Cardinal)
on Aug 17, 2006 at 08:47 UTC ( [id://567853]=perlquestion: print w/replies, xml ) Need Help??

Ovid has asked for the wisdom of the Perl Monks concerning the following question:

A question was posed to me which I am not able to answer, so I turn to you, my brethren.

How the hell do I export something as an MS Word doc if I'm running on Linux? Most of the available modules on the CPAN are in the Win32 namespace. RTF might be OK, but I'm not familiar with this area, so I can't say. The only thing I know about it is that folks constantly complain that RTF screws up their formatting.

The scenario is like this: text is edited in a web-based WYSIWYG editor and people need to be able to export that text in MS Word format. These people are unknown up front so telling them "you can't use MS Word" is not an option, however, it's possible that Web-based WYSIWIG editors are so limited that maybe RTF can handle it all? (Side note, I can't even tell you which WYSIWIG editor because it's still being evaluated.)

Cheers,
Ovid

New address of my CGI Course.

  • Comment on Running Linux but Exporting as MS Word?

Replies are listed 'Best First'.
Re: Running Linux but Exporting as MS Word?
by monkey_boy (Priest) on Aug 17, 2006 at 09:09 UTC
    Maybe you could write your doc in html and then use openoffice to convert it to MSword for you, its free and available on linux, and exports to MSword well. Im not sure how accessable to scripting it is though.

    UPDATE
    some links:
    openoffice comandline
    batch conversion


    This is not a Signature...
Re: Running Linux but Exporting as MS Word?
by davis (Vicar) on Aug 17, 2006 at 09:20 UTC
    I recommend RTF. It's pretty well defined, very stable (the file format hasn't changed much since the year dot), and it's fairly simple to write out with RTF::Writer. It's also well supported: not everyone, not even every Windows user, has Word -- IIRC Wordpad on Windows (installed by default), TextEdit on Mac (installed by default), and one of the office-type options on Linux support it pretty well. I'd try avoiding colours if possible (I've had odd results using TextEdit), but I don't know how complicated your documents are.

    davis
    Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.

      ... but I don't know how complicated your documents are.

      The intended audience is authors. They need to be able to, in real-time, click on an "Export as" link and save the document to their computer as an MS Word doc and, in turn, be able to send that document to a publisher (any publisher) and not have it opened up and look like a garbled, unprofessional mess.

      Cheers,
      Ovid

      New address of my CGI Course.

        For exporting documents so they look the same everywhere, I wholeheartedly recommend PDF. It looks the same on your (the author's) computer as it will on their (the publisher's) computer. However, producing that PDF may be tricky, and quite possibly unnecessary.

        Are the authors fully in control of layout etc? Here's what I'm inferring: you're building a site to allow/help authors write/store some documents of some sort (books; reports; whatever). These authors will decide what layout etc they want for their document, they'll "export" this, and send the exported version to the publisher. Are my inferences correct?

        If they are, I'd recommend seriously considering RTF and restricting the authors' options for layout etc — authors are there to produce content, typesetters are there to decide layout. Very few authors (I can only think of one) are actually good at laying stuff out, therefore your system should (IMHO) allow them to create the logical (thought) structure of their documents, and the publisher will bugger about endlessly with the layout.


        davis
        Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.
Re: Running Linux but Exporting as MS Word?
by tbone1 (Monsignor) on Aug 17, 2006 at 11:48 UTC
    I'll back up the idea of using RTF. I did this at a previous job and it worked without a hitch. In fact, it fooled the suits enough that, one year later, they were doing an audit and wanted to see the information on our licenses for Office on the Solaris servers ...

    Of course, that it was a publishing company and nobody there seemed to have heard of RTF was a bit worrisome ...

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

Re: Running Linux but Exporting as MS Word?
by holli (Abbot) on Aug 17, 2006 at 09:05 UTC
    Word is quite capable to read html and display it. Imho, that's your best and easiest option in this scenario.


    holli, /regexed monk/
Re: Running Linux but Exporting as MS Word?
by Anonymous Monk on Aug 17, 2006 at 10:17 UTC
Re: Running Linux but Exporting as MS Word?
by BrianC (Acolyte) on Aug 17, 2006 at 16:10 UTC
    If you have abiword on your linux system you can do:
    abiword --to=doc foo.xxx
    to convert from format xxx to doc format.

    Brian

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://567853]
Approved by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-24 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found