4

I have an e-commerce web application and I'd some how like to make that print to a label printer for the back end stuff

I have two questions

1) I can't print from a normal webpage straight to the printer (A zedbra LP2844 i think) it just throws out junk

2) I want to be able to print labels to the label printer, but all other printing, such as invoices would go to the default printer - a laser, so need someway of selecting the right printer

It will all happen at a fixed location, so I can insist on for example using Firefox with a specific (custom?) plugin installed (already using firefox so this would be a neat way)

Does anybody know if this is possible, is a firefox extention a possible and/or good way of doing this?

Anybody out there that can write ff plugins?

I would presume this must have been done before surely, but cannot find anything on google

Thanks for any help

Dave

2
  • 1
    I doubt it is. At most, you could trigger the browser's print function, but after that, you are now dealing with the operating system's handling of things. If this is all on your own network, however, you could maybe have the web page trigger some server scripts that could, in theory, produce a PDF from a template then route it to a particular printer connected to that server.
    – DA.
    Nov 30, 2009 at 18:26
  • (in other words, this wouldn't be doable client-side, but potentially server-side.)
    – DA.
    Nov 30, 2009 at 18:27

3 Answers 3

0

Surely the label printer comes with a Windows driver? Then it might be enough to produce pages with the right dimensions in the browser using CSS or, if that won't work out, a PDF.

You can use "cm" or "in" units in your CSS for the label printer; you should be able to set page dimensions and orientation in Firefox's print dialog .

1
  • You can set page size and oritentation in CSS but I think it would be better to specify that in the print dialog. This should be just an issue of generating content with the right size, and setting up the client's computer to print it right. No other special solution should be necessary.
    – Pekka
    Dec 1, 2009 at 11:46
0

As much as I can see there are Windows drivers for this particular printer. Printing shouldn't be a problem after you install them.

0

Thanks for your comments people, I've actually come up with a different solution which comes at the problem from a different angle as selecting the correct printer would likely always be an issue

At the moment we have a windows program that we enter the order number into, it then draws a label and prints it out, but its not pretty and getting changes done to the layout is difficult but more than anything I want the ability to print from the webpage

So what I'm planning is this -

Update the program so it sits in the background and polls the database for a list of orders to be printed, for each order it finds, request an image from the server and print that image to the label

On the server, an image is created on the fly using ASPJpeg which gives me full control over how the label looks

From the webapp, I then have a button on the order to print, this adds the order to a print table... I can then have an interface to the print table which shows whats waiting to print, whats been printed etc, and I can clear the print queue or delete individual items from it just as if it were the windows print queue

Only problem I'm worried about is polling often enough that staff aren't waiting for labels to print and not polling too often that too much bandwidth is being used up

I might make it so that when they hit despatch it sends the label to be printed, or some other existing function that ties into the order process

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.