MsOffice::Word::HTML::Writer

Writing documents for MsWord in HTML format
Download

MsOffice::Word::HTML::Writer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Laurent Dami
  • Publisher web site:
  • http://search.cpan.org/~dami/

MsOffice::Word::HTML::Writer Tags


MsOffice::Word::HTML::Writer Description

Writing documents for MsWord in HTML format MsOffice::Word::HTML::Writer is a Perl module that offers a way to programatically generate documents targeted for Microsoft Word (MsWord). It doesn't need MsWord to be installed, and doesn't even require a Win32 machine (which is why it is not in the Win32 namespace).MsWord can read documents encoded in native binary format, in Rich Text Format (RTF), in WordML (an XML dialect), or -- maybe this is less known -- in HTML, with some special markup for pagination and other MsWord-specific features. Such HTML documents are often in several parts, because attachments like images or headers/footers need to be in separate files; however, since it is more convenient to carry all data in a single file, MsWord also supports the "MHTML" format (or "MHT" for short), i.e. an encapsulation of a whole HTML tree into a single file encoded in MIME multipart format. This format can be generated interactively from MsWord by calling the "SaveAs" menu and choosing the .mht extension.Documents saved with a .mht extension will not directly reopen in MsWord : when clicking on such documents, Windows chooses Internet Explorer as the default display program. However, these documents can be simply renamed with a .doc extension, and will then open directly in MsWord. By the way, the same can be done with WordML or RTF documents. That is to say, MsWord is able to recognize the internal format of a file, without any dependency on the filename.MsOffice::Word::HTML::Writer helps you to programatically generate MsWord documents in MHT format. The advantage of this technique is that one can rely on standard HTML mechanisms for layout control, such as styles, tables, divs, etc. Of course this markup can be produced using your favorite HTML templating module; the added value of MsOffice::Word::HTML::Writer is to help building the MIME multipart file, and provide some abstractions for representing MsWord-specific features (headers, footers, fields, etc.).The MHT format is probably the most convenient way for programmatic document generation, because * unlike Excel, MsWord native binary format is unpublished and therefore cannot be generated without the MsWord executable. * remote control of the MsWord program through an OLE connection, as in Win32::Word::Writer, requires a local installation of Microsoft Office, and is not well suited for servers because the MsWord program might hang or might open dialog boxes that require user input. * generation of documents in RTF is possible, but requires deep knowledge of the RTF structure --- see RTF::Writer. * generation of documents in "WordML" also requires deep knowledge of WordML structure.By contrast, MsOffice::Word::HTML::Writer allows you to produce documents even with little knowledge of MsWord. One word of warning, however : opening MHT documents in MsWord is slower than native binary or RTF documents, because MsWord needs to parse the HTML, compute the layout and convert it into its internal representation. Therefore MHT format is not recommended for large documents. Requirements: · Perl


MsOffice::Word::HTML::Writer Related Software