HTML+CSS to RTF (in PHP)?

前端 未结 3 518
长发绾君心
长发绾君心 2020-12-08 22:47

I am seeking a solution to converting HTML + CSS (2.1) to RTF in PHP. While I have found a superb solution for HTML to PDF in Prince XML, I\'ve yet to find anything that:

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 23:12

    The easiest way to do this is using phpLiveDocx. It is component for the Zend Framework and completely free.

    Supported template file formats (input)

    • DOCX - Microsoft Word DOCX Format
    • DOC - Microsoft Word DOC Format
    • RTF - Rich Text Format File
    • TXD - TX Text Control Format

    Supported document file formats (output)

    • DOCX - Microsoft Word DOCX Format
    • DOC - Microsoft Word DOC Format
    • RTF - Rich Text Format File
    • PDF - Acrobat Portable Document Format
    • TXD - TX Text Control Format
    • TXT - ANSI Plain Text

    From the project web site:

    "phpLiveDocx allows developers to generate documents by combining structured data from PHP with a template, created in a word processor. The resulting document can be saved as a PDF, DOCX, DOC or RTF file. The concept is the same as with mail-merge."

    For details, see:

    http://www.phplivedocx.org/articles/brief-introduction-to-phplivedocx/

提交回复
热议问题