design problem

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
chuck
Forum Newbie
Posts: 2
Joined: Mon Jan 27, 2003 5:55 pm

design problem

Post by chuck »

Hi

I'm developing a web enable database using MySql/PHP.
I would like the user to print mailing labels from their web browser onto a Avary label sheet.

I plan on using pdflib. Has anybody used this lib.
Any idea on how to format the output to a Avery sheets with columns

Are their any scripts available that I can download to accomplish this?
any suggestions

TIA
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post by dstefani »

I have not used this lib, but if I was trying to do this. I'd create the lable page in word and export (save) it to HTML and use that as a template for outputting the DB query in the HTML / Lable format. It seems that it would be just like outputting any query to an HTML table, just one that corresponds to the lable printer paper. (I'd use Dreamweaver command to clean up the word created HTML!)

If you wanted to create a PDF instead of HTML, yep, I'd be going for that lib. But I'd be trying the above to create those as well.

This is just theory, I've never tried this, but it does sound very interesting!

Keep us up to date.

Don
DeGauss
Forum Contributor
Posts: 105
Joined: Tue Oct 22, 2002 9:44 am
Location: Gainesville, FL

Post by DeGauss »

I've used this extension before... And it's not pretty.

You're basically having to specify pixel by pixel where you want text to be placed, what color and font that text has to be and so on and so forth...

The good thing with this is that you can physically tell php to start a new pdf page.

So once you master the thing, it's probably very worthwhile.
kammy
Forum Newbie
Posts: 6
Joined: Sun Feb 02, 2003 5:39 am

Check out FPDF

Post by kammy »

This guy at FPDF has written a nice free PDF generator with tutorials, examples and scripts.

Someone has created a script for what you want, but it's for odbc instead of MySQL.

The site is here;
http://www.fpdf.org/

Here is the script for Avery labels;
http://www.fpdf.org/phorum/read.php?f=1&i=1050&t=1050

If you can change this to MySQL, perhaps you can post here, 'cause I'm looking for the same thing, but being a clueless newbie it's beyond my skills right now..!

good luck...
kammy...
User avatar
redcircle
Forum Commoner
Posts: 43
Joined: Fri Jan 31, 2003 8:47 pm
Location: michigan, usa

Post by redcircle »

that can very easily be re-written to mysql
Post Reply