Zend_Pdf text wrapping

View: New views
8 Messages — Rating Filter:   Alert me  

Zend_Pdf text wrapping

by Jaime Garcia-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

Has somebody experience with text (drawText function) wrapping in pdf documents created from Zend_Pdf?  What I want is wrap text in a defined area in the document. I will appreciate so much your help.

 

Jaime.


Re: Zend_Pdf text wrapping

by Uli Wolf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

i’ve seen a tutorial for this a while ago:
http://blog.alfbox.net/index.php/2008/06/04/wrapping-text-for-zend-pdf/

You could rewrite that for using an area instead of a width.

Hope this helps ;)

Uli


Jaime Garcia wrote:
>
> Hello,
>
> Has somebody experience with text (drawText function) wrapping in pdf
> documents created from Zend_Pdf? What I want is wrap text in a defined
> area in the document. I will appreciate so much your help.
>
> Jaime.
>


Re: Zend_Pdf text wrapping

by lightflowmark :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Other options include trying the DOMPdf lib, which converts HTML pages into Pdfs, or the spin-off from the Zend_Pdf proposal, REFW (see http://www.nabble.com/Plans-for-Zend_PDF-td23425152.html#a23469553)

I wrote a view helper for DomPdf (ConvertToDomPdf2.php), and you'll have to re-do their autoloader function as per http://www.nabble.com/Calling-external-autoload-function-%E2%80%93-how-to--to22987919.html#a22987919, but it's a 2-minute job.

Don't know if any of that is helpful!

M



Uli Wolf wrote:
Hi,

i’ve seen a tutorial for this a while ago:
http://blog.alfbox.net/index.php/2008/06/04/wrapping-text-for-zend-pdf/

You could rewrite that for using an area instead of a width.

Hope this helps ;)

Uli


Jaime Garcia wrote:
>
> Hello,
>
> Has somebody experience with text (drawText function) wrapping in pdf
> documents created from Zend_Pdf? What I want is wrap text in a defined
> area in the document. I will appreciate so much your help.
>
> Jaime.
>

RE: Zend_Pdf text wrapping

by Jaime Garcia-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you a lot for the suggestion Ulrich, I will give a try. I hope this
feature could be available in future releases of ZF. Has anybody knows if
there is any proposal for this feature in Zend_Pdf ?

Best Regards!

> -----Mensaje original-----
> De: Ulrich Wolf [mailto:ml@...]
> Enviado el: Miércoles, 01 de Julio de 2009 02:57 a.m.
> Para: Jaime Garcia
> CC: fw-formats@...
> Asunto: Re: [fw-formats] Zend_Pdf text wrapping
>
> Hi,
>
> i’ve seen a tutorial for this a while ago:
> http://blog.alfbox.net/index.php/2008/06/04/wrapping-text-for-zend-pdf/
>
> You could rewrite that for using an area instead of a width.
>
> Hope this helps ;)
>
> Uli
>
>
> Jaime Garcia wrote:
> >
> > Hello,
> >
> > Has somebody experience with text (drawText function) wrapping in pdf
> > documents created from Zend_Pdf? What I want is wrap text in a
> defined
> > area in the document. I will appreciate so much your help.
> >
> > Jaime.
> >



Re: Zend_Pdf text wrapping

by Nico Edtinger-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jaime Garcia wrote:
> Thank you a lot for the suggestion Ulrich, I will give a try. I hope  
> this
> feature could be available in future releases of ZF. Has anybody  
> knows if
> there is any proposal for this feature in Zend_Pdf ?

Yes: http://framework.zend.com/wiki/x/UwDI
I'm just waiting for comments. I'll put the code online ASAP and add a  
link in the proposal.

nico

RE: Zend_Pdf text wrapping

by Jaime Garcia-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will be glad to check it out and comment according. Thank you a lot Nico.

Regards,
Jaime.

> -----Mensaje original-----
> De: Nico Edtinger [mailto:list-zf-formats@...]
> Enviado el: Miércoles, 01 de Julio de 2009 11:14 a.m.
> Para: Jaime Garcia
> CC: fw-formats@...
> Asunto: Re: [fw-formats] Zend_Pdf text wrapping
>
> Jaime Garcia wrote:
> > Thank you a lot for the suggestion Ulrich, I will give a try. I hope
> > this
> > feature could be available in future releases of ZF. Has anybody
> > knows if
> > there is any proposal for this feature in Zend_Pdf ?
>
> Yes: http://framework.zend.com/wiki/x/UwDI
> I'm just waiting for comments. I'll put the code online ASAP and add a
> link in the proposal.
>
> nico



Re: Zend_Pdf text wrapping

by Nico Edtinger-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

See my comment at the end of the proposal for code and a test file.

Jaime Garcia wrote:

> I will be glad to check it out and comment according. Thank you a  
> lot Nico.
>
> Regards,
> Jaime.
>
>> -----Mensaje original-----
>> De: Nico Edtinger [mailto:list-zf-formats@...]
>> Enviado el: Miércoles, 01 de Julio de 2009 11:14 a.m.
>> Para: Jaime Garcia
>> CC: fw-formats@...
>> Asunto: Re: [fw-formats] Zend_Pdf text wrapping
>>
>> Jaime Garcia wrote:
>>> Thank you a lot for the suggestion Ulrich, I will give a try. I hope
>>> this
>>> feature could be available in future releases of ZF. Has anybody
>>> knows if
>>> there is any proposal for this feature in Zend_Pdf ?
>>
>> Yes: http://framework.zend.com/wiki/x/UwDI
>> I'm just waiting for comments. I'll put the code online ASAP and  
>> add a
>> link in the proposal.
>>
>> nico
>
>

Re: Zend_Pdf text wrapping

by Martijn Korse :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Because the current version of Zend-PDF doesn't support it, I created this class a while ago:

http://devshed.excudo.net/scripts/php/source/excudo+pdf+textblock

It does text-wrapping and alignment.

Jaime Garcia-2 wrote:
Hello,

Has somebody experience with text (drawText function) wrapping in pdf
documents created from Zend_Pdf?  What I want is wrap text in a defined area
in the document. I will appreciate so much your help.

 

Jaime.