I can not really get a topic to print the file with the printer First of all, do not print like echo Should rather a real printer
I have to click on a button on the user, and start printing this page.
Similar to Javascript: window.print () does, but with PHP. Is there such an option?
Thank you!
Do you mean printing on the server - side or client side?
You can include a JavaScript snippet for the client-side that specifies the JS function:
& lt ;? Php print '& lt; Input type = "button" value = "print this document" onclick = "window.print ();" / & Gt; \ N '; ? & Gt; For server side: This is definitely more complex. You can either get a PHP interface, eg To call CUPS (standard Unix printing system) or the system program printing document, Escin has posted a link to an interface a queue interface to print it in MS Windows (can only be useful When the server is running under Windows). EDIT: If you want to find a solution that pays the PHP output printed by the client browser, but is not printed on the client, but on the server - it should be impossible I think you The PHP output can be sent to send a system program that sends the page itself, but 100% will never see it on the client. Perhaps it is acceptable to call a printing program on the server, pass all the necessary information for it and present it to a document of its own, e.g. An RTF text file?
Comments
Post a Comment