Zend_Pdf text wrapping

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_Pdf text wrapping

Jaime Garcia-2

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.

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Pdf text wrapping

Uli Wolf
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.
>

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Pdf text wrapping

LightflowMark-2
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.
>
Reply | Threaded
Open this post in threaded view
|

RE: Zend_Pdf text wrapping

Jaime Garcia-2
In reply to this post by Uli Wolf
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:[hidden email]]
> Enviado el: Miércoles, 01 de Julio de 2009 02:57 a.m.
> Para: Jaime Garcia
> CC: [hidden email]
> 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.
> >


Reply | Threaded
Open this post in threaded view
|

Re: Zend_Pdf text wrapping

Nico Edtinger-4
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
Reply | Threaded
Open this post in threaded view
|

RE: Zend_Pdf text wrapping

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

Regards,
Jaime.

> -----Mensaje original-----
> De: Nico Edtinger [mailto:[hidden email]]
> Enviado el: Miércoles, 01 de Julio de 2009 11:14 a.m.
> Para: Jaime Garcia
> CC: [hidden email]
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Zend_Pdf text wrapping

Nico Edtinger-4
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:[hidden email]]
>> Enviado el: Miércoles, 01 de Julio de 2009 11:14 a.m.
>> Para: Jaime Garcia
>> CC: [hidden email]
>> 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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Pdf text wrapping

Martijn Korse
In reply to this post by Jaime Garcia-2
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.