How does php print the page and determine whether the print is successful (printer)? I use window. print ()! However, this function does not return values.

Source: Internet
Author: User
Tags php print
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.