Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Service_LiveDocx Component Proposal

Proposed Component Name Zend_Service_LiveDocx
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Service_LiveDocx
Proposers Jonathan Maron
Zend Liaison ...
Revision 1.0.4 - April 21, 2009: Added third parameter to constructor, allowing connection to backend service to be encrypted with SSL. Default is to use SSL. Learn more at http://www.phplivedocx.org/2009/04/21/phplivedocx-now-with-ssl-encryption/
1.0.2 - February 04, 2009: Updated proposal.
1.0.1 - February 02, 2009: Split into multiple components: Zend_Service_LiveDocx, Zend_Service_LiveDocx_MailMerge and Zend_Service_LiveDocx_Exception
1.0 - January 29, 2009: Initial Draft. (wiki revision: 34)

Table of Contents

1. Overview

Zend_Pdf is a great component to generate PDF files with ZF. If you want to populate PDF templates with text, however, it can be very time consuming to get the positioning of the text fields just right. After having developed several ZF applications in which text had to be inserted into PDF templates, I knew there must be a better way and went about developing one.

The result is a family of components called Zend_Service_LiveDocx_*:

Zend_Service_LiveDocx_MailMerge 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.

The following template file formats (input) are supported:

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

The following document file formats are supported:

  • 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

The Zend_Service_LiveDocx_* components are an implementation of the LiveDocx web services.

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

Getting started guide: http://www.phplivedocx.org/articles/getting-started-with-phplivedocx/

Download classes and sample applications: http://www.phplivedocx.org/downloads/

Detailed article on why Zend_Service_LiveDocx is needed: http://www.phplivedocx.org/2009/01/15/another-approach-to-ralf-eggerts-pdf-mit-zend/

Basic example: http://www.phplivedocx.org/2009/01/15/basic-phplivedocx-example/

Advanced example: http://www.phplivedocx.org/2009/01/23/more-advanced-phplivedocx-example/

Example of how to convert DOC to PDF with phpLiveDocx (other formats also supported): http://www.phplivedocx.org/2009/02/06/convert-doc-to-pdf-in-php/

Contact the author: http://www.phplivedocx.org/contact/

NOTE: Another component Zend_Service_LiveDocx_Convert is planned, but is not part of this proposal. It will be added later in the year. Zend_Service_LiveDocx_Convert will allow developers to convert word processing files from one format to another. Using Zend_Service_LiveDocx_Convert will simply be a matter of specifying the document and required format. For example, convert document.doc to PDF or document.docx to RTF.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

4. Dependencies on Other Framework Components

  • Zend_Pdf
  • Zend_Soap_Client

5. Theory of Operation

Zend_Service_LiveDocx_MailMerge 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.

Work flow:

1. Load template in Zend_Service_LiveDocx_MailMerge.
2. Assign data to text fields in template.
3. Generate document.
4. Save as a PDF, DOCX, DOC or RTF file.

The Zend_Service_LiveDocx_* components are an implementation of the LiveDocx web services.

6. Milestones / Tasks

  • Publish article on why Zend_Service_LiveDocx_* is needed (outline problems with current solutions)
  • Publish proposal
  • Publish PHP implementation
  • Publish documentation
  • Publish sample applications
  • Publish unit tests
  • Commit to incubator
  • Commit to core

7. Class Index

  • Zend_Service_LiveDocx
  • Zend_Service_LiveDocx_MailMerge
  • Zend_Service_LiveDocx_Exception

8. Use Cases

9. Class Skeletons

Please download the current implementation from www.phpLiveDocx.org: http://www.phplivedocx.org/downloads/

Note: In the above download files, Zend_Service_LiveDocx_* are called Zend_Service_LiveDocx_*. As soon as this proposal has been approved, the classes will be renamed to reflect the ZF coding guidelines.

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.