Added by Logan Buesching, last edited by Logan Buesching on Mar 19, 2008  (view change) show comment

Labels

 
pdf
Zend Pdf Cell

Zend Framework: Zend_Pdf_Cell Component Proposal

Proposed Component Name Zend_Pdf_Cell
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Pdf_Cell
Proposers logan@agoln.net
Revision 1.0 - 19 March 2008: First Draft. (wiki revision: 7)

Table of Contents

1. Overview

Zend_Pdf_Cell is an attempt to provide additional text formatting features to PDF documents. A cell will provide the ability to format, align and position text inside of a PDF document. One or more cells may be attached to one or more PDF documents.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will provide the ability to position cells.
  • This component will provide the ability to position text within cells.
  • This component will provide the ability to format text (font, color, size) within cells.
  • This component will provide the ability to align text within cells.
  • This component will provide the ability to add borders to cells.
  • This component will provide the ability to create multiple cells on a page.
  • This component will provide the ability to attach a cell to one or more pages.
  • This component will not provide the ability to put graphics or images within cells.
  • This component will not provide the ability for a cell to span more than one page.

4. Dependencies on Other Framework Components

  • Zend_Pdf
  • Zend_Pdf_Resource_Font
  • Zend_Pdf_Page
  • Zend_Pdf_Cmap
  • Zend_Pdf_Color

5. Theory of Operation

A developer creates a new cell and attaches it to a page. The when the information is finished, a write() is called to write the text to the PDF document.

6. Milestones / Tasks

  • Milestone 1: Acceptance of proposal
  • Milestone 2: Complete code for use case #1, #2, #3, #4
  • Milestone 3: Unit tests
  • Milestone 4: Complete phpDoc documents
  • Milestone 5: Complete "How to use" documentation

7. Class Index

  • Zend_Pdf_Cell

8. Use Cases

  • Position a cell and text within a cell
  • Align text within cell and position cell in center
  • Add border
  • Word wrap text

9. Class Skeletons

I like this idea and I think it's needed.

I started working on my own implimentation without reading this... now that I've stumbled upon this figured I share some work I've done closely related to this.

http://gorilla3d.com/blog/entry/2008-03-28/zend-pdf-text-wrapping-and-tables

Is this proposal ready for community review? If so, please move it to 'Ready for Review' and announce on the mailing list.

,Wil