Printing Mailing Labels to PDF using EZPDF class.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Grond
Forum Newbie
Posts: 5
Joined: Tue Sep 13, 2005 11:22 am

Printing Mailing Labels to PDF using EZPDF class.

Post by Grond »

Hi,

I'm working on a project and I need to create PDFs that contains mailing labels.

The labels are Avery 5160 format.

I have downloaded the Ezpdf class and have created a form letter pdf (which is the other part of the project).

That was easy.

I'm not sure how to go about using the Ezpdf class so that it can print Avery labels.

Does anybody have any advice/examples they would care to share?

thanks!!!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

create as many columns as needed for the paper, then use a loop to draw each element at the predefined heights down each column until the end. At which point you "go to the next page" (column) and continue...
Grond
Forum Newbie
Posts: 5
Joined: Tue Sep 13, 2005 11:22 am

Post by Grond »

ok...according to avery the 5160 prints 30 labels per sheet so 3 columns...

now for the predefined heights...would that be in inches???

thanks for the info so far...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

pdf's are calculated in points. There's roughly 72 points in an inch.
Grond
Forum Newbie
Posts: 5
Joined: Tue Sep 13, 2005 11:22 am

Post by Grond »

feyd wrote:pdf's are calculated in points. There's roughly 72 points in an inch.
ok...thanks man.

I don't want you to think that I want you to do this...I just need an example or some clues...

ya dig??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

basically, it'll just take some trial and error for a while to know how much data you can print and where.. basically, you'd use setY() a lot. :)
Post Reply