kksou wrote:
Has anyone tried this before on a USB-port barcode printer?
I'm still experimenting around. DOS simply isn't comfortable with USB ports. However, I found some interesting articles:
http://www.decompile.com/dataflex/tips/usb_printer.htm http://geekswithblogs.net/dtotzke/articles/26204.aspx
With some work one could get this working through php. My problems regarding this issue still aren't solved. Well, I decided to go with PHP printer functions on Windows...
For Linux I'd have to work with the sockets, if I want to talk to the printers directly. However, that seems a bit messy, specially if you never know where you're going to install your programs. I think that I'll stick to the PS library and lpr if I need to format pages properly... it's about the only thing that's always the same on Linux, in terms of printing.
For more trivial printing jobs I've written these functions:
http://3w.terrasco.net/d-files.php?a=Software:PHP:Kovus_Plugins
(chose the printer plugin, you don't need the CommandLine functions)
It allows you to do a unified function call
lpr(), which will automatically perform the correct action and system calls for either Linux or Windows. It is able to print
text & html (passed by a string) {note that HTML will call Firefox for printing}, as well as
PS, PDF. Note that it can't create postscript files - its job is to print - not more, not less... you will need to generate PS/PDF through PSlib/PDFlib (or through an external application), as usual. (Further, it needs Ghostscript to be installed on Windows!)
As many flaws as I see in Windows, I have to say that it at least comes with a working printing standard...
I'm currently building a new computer, on which I will double boot with Windows Vista and Linux... so... I can put more efforts into this printing issue. I'll let you know when I find out more.