Presentation is loading. Please wait.

Presentation is loading. Please wait.

PL-IV (Group B-12) Printer Server

Similar presentations


Presentation on theme: "PL-IV (Group B-12) Printer Server"— Presentation transcript:

1 PL-IV (Group B-12) Printer Server

2 Outline Server Settings Client Settings Program Program Explanation
Steps to run Program

3 Server Settings On the server machine (the one the printer is attached to), open System -> Administration -> Printing (If the menu item does not exist you need to add system-config-printer to the menu). . This will open the Printer Configuration window.

4 Server Settings …. Select Server in the menu bar, and then Settings. This will open the Basic Server Settings window. Check the second box: OK

5 Server Settings….. Right click the printer and check the Shared option, if not checked yet Check that users that you want to be able to use the printer are not excluded. See Properties>Access Control>"allow printing for everyone".

6 Client Settings in Ubuntu
System -> Administration -> Printing Add - Network printer Click Find network printer Specify the host IP address or name. Click Find Printers on the target machine should be found, no matter whether they are connected using CUPS or SAMBA.

7 Client Settings in Ubuntu (If first setting does not work)
1. Goto System Settings 2. Click on Printers 3. Click on Add option 4. Network Printer 5. Find New Printer 6. Give hostname as: SNJB-V13K-NX-2 7. Click on find 8. Click on Forward button 9. Select option as printer from database 10. In make select Epson 11. Click on Forward button 12. Select Model LX 300+ 13. Click on Forward button 14. Click on Apply button

8 Program import subprocess, os printer='EPSON-LX-300+'
pdffile='print.py' cmd = 'lp -d %s %s' %(printer, pdffile) os.system(cmd) lpr = subprocess.Popen("/usr/bin/lpr", stdin=subprocess.PIPE)

9 Program Explanation (Functions Used)
import sub process: The sub process module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. lp –d : The lp command is used to print files on Unix and Linux systems. The name "lp" stands for "line printer". The -d option specifies the destination. Eg: lp –d Sales file1 file2 file3 File1, 2 and 3 will be printed on destination printer named Sales. os.system(): It is used to execute the command without using shell.

10 Steps to run Program Go to terminal Give command
Sudo python programname.py


Download ppt "PL-IV (Group B-12) Printer Server"

Similar presentations


Ads by Google