Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="info"><ac:parameter ac:name="title">Zend Pdf Cell</ac:parameter></ac:macro>

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

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

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: 9)

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

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

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

Labels:
pdf pdf Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 26, 2008

    <p>I like this idea and I think it's needed.</p>

  2. Mar 28, 2008

    <p>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.</p>

    <p><a href="http://gorilla3d.com/blog/entry/2008-03-28/zend-pdf-text-wrapping-and-tables">http://gorilla3d.com/blog/entry/2008-03-28/zend-pdf-text-wrapping-and-tables</a></p>

  3. Jun 20, 2008

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

    <p>,Wil</p>

  4. Feb 19, 2009

    <p>I'm getting this warning on some servers:</p>

    <p>Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of <ac:link><ri:page ri:content-title="runtime function name" /></ac:link>(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /usr/docroot/app/vendors/Zend/Pdf/Cell.php on line 240</p>

    <p>I'd suggest changing the call to _wordWrap() on line 240 to not use call-time pass-by-reference, and instead change the method signature of _wordWrap() to accept the $section parameter by reference.</p>

    <p>Other impressions so far:</p>

    <p>I'm finding that occasionally ALIGN_CENTER seems to get ignored by addText() and the text obstinately shows up left-aligned. I can't determine what causes it when it occurs as yet; and I'm having difficulty understanding how setPosition is supposed to work (or even if it actually does work). So far, getting stuff positioned just the way I want it is still a tad too trial-and-error for my taste and could use some documentation.</p>

    <p>To write a blank line to a cell, you have to call addText() in between successive calls to newLine(). And it would be nice if newlines in the text passed to addText came through as line breaks in the results.</p>

    <p>And finally, there's an issue of running out of memory if you try to pass very much text to addText() at one time. I'm sure that the algorithm being used can probably be tweaked to try smaller chunks of text at a time.</p>

    <p>But overall, great idea, and I'm finding it very useful.</p>

  5. Feb 06, 2011

    <p>Archiving this proposal, feel free to recover it when you want to work on it again. For more details see <a href="http://framework.zend.com/wiki/display/ZFDEV/Archiving+of+abandoned+proposals+(Feb+5+2011)">this email</a>.</p>