How does php print the page and determine whether the print is successful (printer)? I use window. print ()! However, if this function does not return a value, you cannot determine whether the print is successful! I want to add a piece of data to the database after the printing is successful! Prawns help... How can I print data in another way? It is better to simply implement this function! ------ Solution -------------------- If the printing is successful, you have to check with the naked eye how php prints the page and whether the printing is successful (printer). I use window. print ()! However, this function does not return values.
You cannot determine whether the print is successful! I want to add a piece of data to the database after the printing is successful! Prawns help... How can I print data in another way? It is better to simply implement this function!
------ Solution --------------------
If the printing is successful, you must check with the naked eye. Unless the hardware provides such an interface, only one printed command can be sent.
------ Solution --------------------
In addition, window. print () is a js function. Php is running on the server side, unless you plan to print something on the server or be able to share the printer print ..
------ Solution --------------------
Discussion
Reference:
If the printing is successful, you must check with the naked eye. Unless the hardware provides such an interface, only one printed command can be sent.
However, I want to add a piece of data to the database after the printing is successful! How can I trigger this program? Are you sure you have clicked "print? If you have already clicked, but the printer fails to print successfully, but the program is triggered, it is a bit uneconomical!