Discussion:
Zend_Pdf
Justin Zipkin
2007-07-12 04:48:35 UTC
Permalink
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done somewhere,
but he recommended I sign up on this list and at least keep an eye on what
was happening around here.

If anybody is interested in the code that I have, I would be more than happy
to share it. Also, if there are any small bug fixes or anything that I
could be helpful with, I am willing to do what I can. I have only been
poking around with the framework for a few weeks, so am by no means an
expert, but the more I sort through the code the more productive I can be
here, and I figure maybe I can actually give a little bit back to the
community.

In any case, I look forward to doing what I can, and for as much as I have
seen the Zend Framework is pretty impressive. Thanks everybody!


Regards,

Justin Zipkin
Alexander Veremyev
2007-07-12 05:42:12 UTC
Permalink
Hi Justin,

You are welcome! :)


With best regards,
Alexander Veremyev.
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least keep
an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more than
happy to share it. Also, if there are any small bug fixes or anything
that I could be helpful with, I am willing to do what I can. I have
only been poking around with the framework for a few weeks, so am by no
means an expert, but the more I sort through the code the more
productive I can be here, and I figure maybe I can actually give a
little bit back to the community.
In any case, I look forward to doing what I can, and for as much as I
have seen the Zend Framework is pretty impressive. Thanks everybody!
Regards,
Justin Zipkin
Alexander Veremyev
2007-07-12 18:41:21 UTC
Permalink
PS :)

I think that's good idea to share code through an issue tracker
(http://framework.zend.com/issues/secure/BrowseProject.jspa).
It's good place to put improvement/feature requests. It also allows to
keep discussion in one place and allows to attach files.

If you are not registered within JIRA yet, you can do it here -
http://framework.zend.com/issues/secure/Signup!default.jspa


There are also two improvements that would be good to have in Zend_Pdf now.
1. PDF document properties support
http://framework.zend.com/issues/browse/ZF-1665

2. Barcode printing support http://framework.zend.com/issues/browse/ZF-1712

Both of them are already have several votes.


With best regards,
Alexander Veremyev.
Post by Alexander Veremyev
Hi Justin,
You are welcome! :)
With best regards,
Alexander Veremyev.
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least keep
an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more than
happy to share it. Also, if there are any small bug fixes or anything
that I could be helpful with, I am willing to do what I can. I have
only been poking around with the framework for a few weeks, so am by
no means an expert, but the more I sort through the code the more
productive I can be here, and I figure maybe I can actually give a
little bit back to the community.
In any case, I look forward to doing what I can, and for as much as I
have seen the Zend Framework is pretty impressive. Thanks everybody!
Regards,
Justin Zipkin
Willie Alberty
2007-07-12 18:31:19 UTC
Permalink
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight
on #ztalk about some code I whipped up for text alignment/word wrap
in Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least
keep an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more
than happy to share it.
Last summer when I wrote the TrueType font parser code, I started
working on some layout classes that would also take care of alignment
and text wrapping, plus handle inline font, size, color, style, etc.
changes. The project that was financing that work stalled and the
code sits partially implemented, but I intend to return to it soon.
If you'd be interested in working with me on it, I'd welcome the help.

In the meantime, I'd love to take a look at the code you've written.
We may be able to combine the work you've done with some of my own
code and provide a few valuable helper classes to the community while
waiting for a full-fledged text layout system.

--

Willie Alberty, Owner
Spenlen Media
willie-***@public.gmane.org

http://www.spenlen.com/
Kevin McArthur
2007-07-12 18:57:21 UTC
Permalink
Hey Willie,

I too will be back working on zpdf soon (similar reasons, stalled project
for client) but its picking up again soon *yay*

Can you pass along the most up-to-date patch you have (preferably against
the 1.0 line) so that we can go through it.

K
----- Original Message -----
From: "Willie Alberty" <willie-***@public.gmane.org>
To: <fw-formats-***@public.gmane.org>
Sent: Thursday, July 12, 2007 12:31 PM
Subject: Re: [fw-formats] Zend_Pdf
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least keep
an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more than
happy to share it.
Last summer when I wrote the TrueType font parser code, I started working
on some layout classes that would also take care of alignment and text
wrapping, plus handle inline font, size, color, style, etc. changes. The
project that was financing that work stalled and the code sits partially
implemented, but I intend to return to it soon. If you'd be interested in
working with me on it, I'd welcome the help.
In the meantime, I'd love to take a look at the code you've written. We
may be able to combine the work you've done with some of my own code and
provide a few valuable helper classes to the community while waiting for
a full-fledged text layout system.
--
Willie Alberty, Owner
Spenlen Media
http://www.spenlen.com/
Justin Zipkin
2007-07-12 19:17:04 UTC
Permalink
Willie,

All too often do I find myself with started projects that just get trumped
by other more important things out there, so I know how it goes.

As I mentioned to Kevin yesterday, I don't know too much about protocol when
it comes to working on open source projects. I don't want to step on
anyones toes, so while I just created a ZF issue tracker account, I will
just attach the code I have to this mail for now. If I shouldn't be doing
that in the future just let me know.

Also, no promises that this code is flawless, but it seems to work pretty
well for what I need it for. I also wasn't sure what the procedure was for
just flat out changing things, so I instead just extended Zend_Pdf_Page and
overrode the drawText() function to be a little more robust. I guess it
would probably never make it into the project like that, although I feel
like it may be desirable to make a text resource class rather than just
using a string.

This is also my first shot at writing code against PDF... but after a bit of
digging through the spec I think I have a pretty good idea of how things
work.

If you decide in a few weeks to jump back into Zend_Pdf, or you think I
could be of help with anything else small let me know. Maybe I'll dig
through the bugs list on the Issue Tracker and try and find some things that
aren't being worked on.

Justin
Post by Willie Alberty
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight
on #ztalk about some code I whipped up for text alignment/word wrap
in Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least
keep an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more
than happy to share it.
Last summer when I wrote the TrueType font parser code, I started
working on some layout classes that would also take care of alignment
and text wrapping, plus handle inline font, size, color, style, etc.
changes. The project that was financing that work stalled and the
code sits partially implemented, but I intend to return to it soon.
If you'd be interested in working with me on it, I'd welcome the help.
In the meantime, I'd love to take a look at the code you've written.
We may be able to combine the work you've done with some of my own
code and provide a few valuable helper classes to the community while
waiting for a full-fledged text layout system.
--
Willie Alberty, Owner
Spenlen Media
http://www.spenlen.com/
Kevin McArthur
2007-07-12 19:29:48 UTC
Permalink
Justin

Welcome to the contribution process, great to have another zpdf guy!

Thanks for the code, but, before I review it I need to know that you have signed the CLA agreement. (see the contributing page of the zend framework site)

The next step would be to create a patch vs the latest SVN... the easiest way to do this is check-out, and apply your changes to the file. Then run the svn diff > file.patch command, which will create a file we can use to 1) see your changes easier and 2) patch/test our code installations (which have other patches applied)

I've CC'd Andi (for lack of someone better) to help get your CLA in order.

Thanks for helping out

Kevin
----- Original Message -----
From: Justin Zipkin
To: Willie Alberty
Cc: fw-formats-***@public.gmane.org
Sent: Thursday, July 12, 2007 1:17 PM
Subject: Re: [fw-formats] Zend_Pdf


Willie,

All too often do I find myself with started projects that just get trumped by other more important things out there, so I know how it goes.

As I mentioned to Kevin yesterday, I don't know too much about protocol when it comes to working on open source projects. I don't want to step on anyones toes, so while I just created a ZF issue tracker account, I will just attach the code I have to this mail for now. If I shouldn't be doing that in the future just let me know.

Also, no promises that this code is flawless, but it seems to work pretty well for what I need it for. I also wasn't sure what the procedure was for just flat out changing things, so I instead just extended Zend_Pdf_Page and overrode the drawText() function to be a little more robust. I guess it would probably never make it into the project like that, although I feel like it may be desirable to make a text resource class rather than just using a string.

This is also my first shot at writing code against PDF... but after a bit of digging through the spec I think I have a pretty good idea of how things work.

If you decide in a few weeks to jump back into Zend_Pdf, or you think I could be of help with anything else small let me know. Maybe I'll dig through the bugs list on the Issue Tracker and try and find some things that aren't being worked on.

Justin
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight
on #ztalk about some code I whipped up for text alignment/word wrap
in Zend_Pdf. According to him this work is probably already done
somewhere, but he recommended I sign up on this list and at least
keep an eye on what was happening around here.
If anybody is interested in the code that I have, I would be more
than happy to share it.
Last summer when I wrote the TrueType font parser code, I started
working on some layout classes that would also take care of alignment
and text wrapping, plus handle inline font, size, color, style, etc.
changes. The project that was financing that work stalled and the
code sits partially implemented, but I intend to return to it soon.
If you'd be interested in working with me on it, I'd welcome the help.

In the meantime, I'd love to take a look at the code you've written.
We may be able to combine the work you've done with some of my own
code and provide a few valuable helper classes to the community while
waiting for a full-fledged text layout system.

--

Willie Alberty, Owner
Spenlen Media
willie-***@public.gmane.org

http://www.spenlen.com/
Jasp182
2007-09-14 04:22:07 UTC
Permalink
Hey Justin. I'd love to hear what you're doing with PDF's and I would have
no problem swapping code (comparing notes) if you're interested. I posted
this same question a few months before you posted this one and ended up
using Willie's getStringWidth function to build a whole system of text
alignment and word wrap. I ended up sub-classing Zend_Pdf (document object)
and Zend_Pdf_Page (page object) so that I could further subclass the page
object to make a variety of pdf templates using a number of generic utility
methods at the base class level (word wrapping, getting the height of a
block of text before drawing it, etc). I tried a couple of functions for
aligning text horizontally and vertically at first, but I ended up making
PdfParagraph and PdfParagraphText classes so that blocks of text could have
different font sizes, text alignment, color, etc for successive lines while
performing word wrap and relative alignment.

Also, I just finished writing a method for loading gif images as resources
since this is not supported at the framework level (at least for the version
I'm using). It just writes it to a tmp file as a jpeg using gd (I guess
this would be considered a hack and that's why the framework didn't just do
it that way...or because gd may not be universally supported?).

When I was initially looking for information, I didn't see as much work in
this area as I would have expected, so I would gladly share what I have done
with the community.

- Rich
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done somewhere,
but he recommended I sign up on this list and at least keep an eye on what
was happening around here.
If anybody is interested in the code that I have, I would be more than happy
to share it. Also, if there are any small bug fixes or anything that I
could be helpful with, I am willing to do what I can. I have only been
poking around with the framework for a few weeks, so am by no means an
expert, but the more I sort through the code the more productive I can be
here, and I figure maybe I can actually give a little bit back to the
community.
In any case, I look forward to doing what I can, and for as much as I have
seen the Zend Framework is pretty impressive. Thanks everybody!
Regards,
Justin Zipkin
--
View this message in context: http://www.nabble.com/Zend_Pdf-tf4066082s16154.html#a12668232
Sent from the Zend MFS mailing list archive at Nabble.com.
Kevin McArthur
2007-09-14 04:36:14 UTC
Permalink
Rich,

If you're a CLA signer, please send along what code you're willing to share
and I'm sure we can take a look at adding its functionality. Willie and I
will likely be doing some more work on ZPDF in the near future.

As for GIF support, I didn't add it with gd because we are trying to keep
the dependancies very vanilla. That said jpeg support depends on GD
(something i had hoped to have factored out by now) thus, it might be able
to be added as-is. It will be up to Zend (alex) whether the GD dependancy
becomes permanent, but at this point if someone wants to write a jpeg parser
it should be fairly easy to cut out.

The more hands the better,

Kevin

----- Original Message -----
From: "Jasp182" <jasp182-***@public.gmane.org>
To: <fw-formats-***@public.gmane.org>
Sent: Thursday, September 13, 2007 9:22 PM
Subject: Re: [fw-formats] Zend_Pdf
Post by Jasp182
Hey Justin. I'd love to hear what you're doing with PDF's and I would have
no problem swapping code (comparing notes) if you're interested. I posted
this same question a few months before you posted this one and ended up
using Willie's getStringWidth function to build a whole system of text
alignment and word wrap. I ended up sub-classing Zend_Pdf (document object)
and Zend_Pdf_Page (page object) so that I could further subclass the page
object to make a variety of pdf templates using a number of generic utility
methods at the base class level (word wrapping, getting the height of a
block of text before drawing it, etc). I tried a couple of functions for
aligning text horizontally and vertically at first, but I ended up making
PdfParagraph and PdfParagraphText classes so that blocks of text could have
different font sizes, text alignment, color, etc for successive lines while
performing word wrap and relative alignment.
Also, I just finished writing a method for loading gif images as resources
since this is not supported at the framework level (at least for the version
I'm using). It just writes it to a tmp file as a jpeg using gd (I guess
this would be considered a hack and that's why the framework didn't just do
it that way...or because gd may not be universally supported?).
When I was initially looking for information, I didn't see as much work in
this area as I would have expected, so I would gladly share what I have done
with the community.
- Rich
Post by Justin Zipkin
Just sending a quick hello out. I spoke briefly with Kevin tonight on
#ztalk about some code I whipped up for text alignment/word wrap in
Zend_Pdf. According to him this work is probably already done somewhere,
but he recommended I sign up on this list and at least keep an eye on what
was happening around here.
If anybody is interested in the code that I have, I would be more than happy
to share it. Also, if there are any small bug fixes or anything that I
could be helpful with, I am willing to do what I can. I have only been
poking around with the framework for a few weeks, so am by no means an
expert, but the more I sort through the code the more productive I can be
here, and I figure maybe I can actually give a little bit back to the
community.
In any case, I look forward to doing what I can, and for as much as I have
seen the Zend Framework is pretty impressive. Thanks everybody!
Regards,
Justin Zipkin
--
http://www.nabble.com/Zend_Pdf-tf4066082s16154.html#a12668232
Sent from the Zend MFS mailing list archive at Nabble.com.
Loading...