Hi,

I have been searching for a couple of days now for a resolution to this issue, and while I find a few references to it in google, nothing really defines the entire process.

I have a MySql table called 'product_distribution'

When a customer orders a product, all pertinent information is recorded in the table

Periodically the admin needs to 'Process' these records

I can do a query to extract the product order information from the product_distribution table and the shipping address from the members table, but I need to output it in a special format.

The result of processing the records needs to be to send the product distribution center a listing in the correct format to print on an avery 5160 sheet of labels, which is 3 across and 10 up... Pretty standard format.

Standard formatting of the information in a columnar format in tables seemed to me to be an easy solution, but appears to be too volatile, and not near exacting enough.

Researching leads me to believe that producing a PDF formatted to the 5160 label sheet would probably be the most reasonable solution..

Then several hours of researching uncovered several possible options to accomplish that, but still nothing firm and complete enough for me to complete that phase of the project...

Any Suggestions / Solutions / Direction / ....

Thank you in advance.

Douglas

Recommended Answers

All 4 Replies

I think PDF file generated from data stored in a database would be the most accurate thing. For generating PDF I recommend using TCPDF library (http://www.tcpdf.org/) which is mature, supported and with plenty of examples. It is worth spending a day or two to learn how to use it.

I think PDF file generated from data stored in a database would be the most accurate thing. For generating PDF I recommend using TCPDF library (http://www.tcpdf.org/) which is mature, supported and with plenty of examples. It is worth spending a day or two to learn how to use it.

Thanks for the reply...

Is that something that I would be able to generate the desired format and just send it as a pdf to the fulfillment center, and they could print it directly to the label sheet?

Yes, I am pretty sure so. PDF file enables you to position text precisely and it will print on many platforms exactly the same. Using TCPDF library you can create a document with all it's properties (page size, format, orientation etc) accurately defined margins and containing cells as per label specifications. Cells are filled then with the data from the database. You can define different font for each label if you wish. The library also takes takes care of creating page breaks.

You can also define what will the output be: a document can be opened in a browser or offered for a download or saved to a predefined location. You can send the PDF to the distribution center (or they can download it from your site) and they can just print it on sheets with labels.

Other option would be that you send them an Excel spreadshet (PHP can create an Excel spreadsheet file) and they use mail merge function to print the labels but that means they must do so me work themselves (preparing and carrying out a mail merge procedure in Word or other text processing program).

Yes, I am pretty sure so. PDF file enables you to position text precisely and it will print on many platforms exactly the same. Using TCPDF library you can create a document with all it's properties (page size, format, orientation etc) accurately defined margins and containing cells as per label specifications. Cells are filled then with the data from the database. You can define different font for each label if you wish. The library also takes takes care of creating page breaks.

You can also define what will the output be: a document can be opened in a browser or offered for a download or saved to a predefined location. You can send the PDF to the distribution center (or they can download it from your site) and they can just print it on sheets with labels.

Other option would be that you send them an Excel spreadshet (PHP can create an Excel spreadsheet file) and they use mail merge function to print the labels but that means they must do so me work themselves (preparing and carrying out a mail merge procedure in Word or other text processing program).

Thank You Broj1 - That was exactly the answers I was looking for.

The Excel answer confirmed what I thought I should be able to do in the interim between now and when I learn about the PDF.

I appreciate your direct and concise response to my questions.

Now I can mark this thread finished...

Douglas

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.