LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-10-2012, 12:45 PM   #1
AlGal
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Rep: Reputation: Disabled
Server side printing with Apache


Hi guys, long time lurker, first time posting,

I would really appreciate if someone to help me solve this little issue I am having with a project I am working on; Basically it is a time and attendance system for my workplace. I have a Lampp (xampp) server running on ubuntu 9.04 and a modified 02 Joggler running on xubuntu 12 as the only client.

What I have done is setup a TM-88V reciept printer on the Joggler and shared it so the server can see it, what I need to do is when a user clicks the print button the reciept printer runs off a list, this part I can do however I wanted some advise on the best way to have the server print??,

I thought perhaps having php generate the text from sql and store it in a temp file, then use exec to lpr that file, I am trying to avoid any page generation or use prompt on the client side (as its a small touchscreen).

Any advise on the matter would be truly appreciated!
 
Old 06-11-2012, 06:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
where is this print button located? is this in the menu of the browser or on the displayed page within the browser?
In the first case the client itself will try to print and the client need access to the printer. In the second case you can implement the print function on the server (by handling the events of that button)
 
Old 06-11-2012, 07:24 AM   #3
AlGal
LQ Newbie
 
Registered: Jun 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
It would be an element in a html page, most likely a hyperlink to a php page which would run the sql quieries,generate the textfile then do something like:
echo exec('cat thetextfile.txt > /dev/lp');

although the client side has the printer attached, it will never print by itself, its only for location effectivness. That and the networked version of the printer costs a fortune.
 
Old 06-11-2012, 08:41 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
At first glance it should work. Have you tried printing a test file from the server yet? Any command executed will be local to the server not the client.

lpr -P Shared_printer_name test_file
 
  


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
Mounting multiple NFS or Samba shares: client-side or server-side? mariogiov Linux - Server 4 04-03-2012 08:11 AM
[SOLVED] Having trouble with Apache Server Side Includes rmknox Linux - Newbie 29 07-26-2010 05:39 PM
Both side printing ursusca Linux - Hardware 1 10-05-2008 09:15 PM
Apache; server side include unifiedquarks Linux - Server 3 05-07-2007 05:44 AM
How to run a server-side Javascript in Apache Linh Programming 2 07-15-2004 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:53 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