Link to home
Start Free TrialLog in
Avatar of Alejandro_Lopez
Alejandro_Lopez

asked on

Printing invoices with php/mysql

Hi I'm developing a customer system with php and mysql, but i need to print invoices not in a lasser or inkjet printer but on impact (matrix) printer, and manipulate by strings (i guess) the output to use pre printed forms

I saw using javascript can do it, or with microsoft templates, but both are using a laser printer

Can someone help me with this thing telling me how can i do it?

thanks

Regards
ASKER CERTIFIED SOLUTION
Avatar of ethrbunny
ethrbunny

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alejandro_Lopez
Alejandro_Lopez

ASKER

Good way to solve the problem, i just tried and work fine (depending on the installation of the printer generic text or driver) but it is related to IE, and i'm just trying not to depend on any browser feature or plattaform. Don't you know any javascript solution??

thanks
The 'window' object is just javascript. Its not IE dependant. Neither is the <INPUT> element.
The question is whether you want to print to a printer attached to a server or attached to the client....

If you need to print an invoice clientside, you should probably use the window.print() function of JavaScript. You can't avoid the 'select printer' popup here. Another option might be a Java-applet (should be platform independant), although I'm not sure about that.

If you need to print an invoice serverside, you can use PHP printer functions (see http://www.php.net/printer). This probably works for network printers as well, as long as the printer has been defined on the server.