LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-06-2005, 10:48 PM   #1
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
PHP : Send Data To Printer


Dear All,

Simple question but i can't find the answer.
anyone know is the php able to send the data that we have retrieve from mysql to printer??
what is the script??

thanks
 
Old 04-07-2005, 04:29 PM   #2
Spudley
Member
 
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
I'm assuming your script works like most PHP, and produces a web page to be viewed in a browser.

In that case actual PHP code won't help, because the printing is done at the client side (ie the browser). What you would need to do is include a small amount of Javascript in your HTML output.

Something like this....
Code:
<script language="javascript">
<!--
window.print();
// -->
</script>
Putting that script into your page (at the end of the HTML) will cause the browser to pop up it's print dialog immediately once the page is loaded.

Hope that helps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send data from kernel to user thegreatest Programming 5 11-23-2005 06:55 AM
Send data to the keyboard buffer rrodrigues Programming 5 07-20-2004 09:26 AM
getting ENOBUFS while trying to send data arb Programming 0 09-19-2003 06:52 AM
Dialing only when there is data to send via PPP ruchika Linux - Software 6 09-10-2003 11:30 AM
How to Send data to the parallel port lambada Programming 2 02-12-2003 09:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration