+ 1
Printing file on server using php
How can i print a file that exists on server using my printer in php? EDIT I am sorry if i didn't state my question clearly. My question is that if i want to print something, how can i do it using PHP? Example: Assume that i have a website where people buy different products. When a person pays, i generate an invoice for that person. I want the person to be able to print his/her invoice. I want to provide the user an option to print his/her invoice. How can i do that in php?
3 Antworten
+ 15
You need Javascript for this. Generate a page with an invoice with PHP and add a button which calls window.print();
Here's an example:
https://www.w3schools.com/jsref/met_win_print.asp
+ 13
Can you please clarify your question?
0
Edited my question