What I mean is, lets say I have a content:
\"Stackoverflow is the best, bla bla bla...\"
I want to print the content in a paper, not computer monitor, how to
Printing on a client browser cannot be done by php. Its done by javascript.
<form>
<input type="button" value="Print This Page" onClick="window.print()" />
</form>
Its best to describe a print css for the page.
Use javascript for this
window.print();
window.print(): Opens the Print Dialog to print the current document.
A better way to do it is like this:
<a href="#" onclick="window.print(); return false;">Print Me</a>
Adding the return false; to the onclick event will stop the browser following the link, and using the <a> tag with the href will cause the link cursor to appear on mouseover. Without it there would just be an arrow cursor which doesn't always make it obvious it's a link.
Do you mean printing from the Web server or from the client? If from the client window.print() in JavaScript will do the trick- http://www.javascriptkit.com/howto/newtech2.shtml.
I ask because I have seen Web based systems that actually do the printing from the server!
Those CMS are probably just calling the JavaScript method window.print to pop up the print dialog:
<span onclick="window.print()" class="pseudo-link">print this document</span>
The rest is then handled by the browser and operating system.