network-printers

How to print directly from printer with Yii?

╄→гoц情女王★ 提交于 2019-12-11 00:55:56
问题 How do I print directly from printer? This is a intranet web application. The user will use this application and they will print out the report from the printer of their department (different department, different printer). I'm Googling to print out directly from printer, but I can't find anywhere. I'm using Yii Framework 1.11. How can I do this? Is it possible to print out directly from printer? How? 回答1: You can try this:- $fhandle = fopen("test.php","rb"); $contents = fread($fhandle,

ManagementObjectSearcher select network printers?

て烟熏妆下的殇ゞ 提交于 2019-12-10 23:58:55
问题 I use : ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Printer"); to get printers but it find local printers.. It's possible to select network printers , by ip maybe ? 回答1: Pass " Network " to the object indexer of each item in your ManagementObjectCollection. If the printer is a network printer it will return true. Likewise you can pass " Local " to determine if the printer is local. var searcher = new ManagementObjectSearcher("root\

Connect Android device to WiFi printer

余生长醉 提交于 2019-12-10 18:15:47
问题 I want to print my pdf document by my Android phone using wifi on any other way. or please give me a suggestion about it is possible to connect our Device to wifi printer or send our document for printing. I hope, I will get best answer or any suggestion from your side as soon as possible. 回答1: The simplest way I can think of is using Google Cloud print on android 来源: https://stackoverflow.com/questions/6290839/connect-android-device-to-wifi-printer

Android print text on printer

我是研究僧i 提交于 2019-12-10 10:26:15
问题 I am developing a restaurant app which print receipts after customer purchases foods. I have added a config screen in app which the manager uses to configure printers. A manager can print a test page to test whether he has entered right ip and port. Here is my code which prints test page: private class PrintTask extends AsyncTask<Printer, Boolean, String> { @Override protected String doInBackground(Printer... params) { try { publishProgress(true); Socket sock = new Socket(params[0].getIp(),

How are printer notifications in Windows supposed to work with network printers?

主宰稳场 提交于 2019-12-08 04:24:14
问题 I have an application which needs to print files of different types using their associated applications for printing using ShellExecute and the "print" verb. My application needs to (hopefully) reliably know when one print job is completely processed and it can issue the next one. I accomplish this using FindNextPrinterChangeNotification and everything seems to work fine using local printers, e.g. installed via USB, but I get a completely different behavior if network printers are involved.

Printing pdf file directly from dos command line

一曲冷凌霜 提交于 2019-12-07 19:12:19
问题 I am trying to print a pdf file from dos, in windows xp. C:\>print c:\dos.pdf /D:"\\jayaprada-pc\HP LaserJet 1018" C:\dos.pdf is currently being printed Its saying doc is being is printed. but no print is coming my printer. Its showing the document in printer spooler window. When giving print normally from adobe reader , print is coming fine. What is wrong with my config. Actually i want to print a pdf document from command line , so it wont pop up printer properties. Suggest me any other

How are printer notifications in Windows supposed to work with network printers?

元气小坏坏 提交于 2019-12-07 02:12:26
I have an application which needs to print files of different types using their associated applications for printing using ShellExecute and the "print" verb. My application needs to (hopefully) reliably know when one print job is completely processed and it can issue the next one. I accomplish this using FindNextPrinterChangeNotification and everything seems to work fine using local printers, e.g. installed via USB, but I get a completely different behavior if network printers are involved. One of my clients used my application with a network printer, meaning a professional printer with it's

check if installed network printer is online

余生长醉 提交于 2019-12-03 14:58:51
I want to check if printer is online. For this I get the printer handle with OpenPrinter. Then I want to use PRINTER_STATUS_OFFLINE in PRINTER_INFO_6 with GetPrinter(). The result is always 0? How do I get the offline state of my printer? Code I used. bool IsPrinterOnline(wstring strPrinterFriendlyName) { HANDLE hPrinter ; if ( OpenPrinter(const_cast<LPWSTR>(strPrinterFriendlyName.c_str()), &hPrinter, NULL) == 0 ) { /*OpenPrinter call failed*/ return false; } DWORD dwBufsize = 0; PRINTER_INFO_6* pinfo = 0; GetPrinter(hPrinter, 6,(LPBYTE)pinfo, dwBufsize, &dwBufsize); //Get dwBufsize PRINTER

Network printing with window service

牧云@^-^@ 提交于 2019-12-02 20:21:14
问题 I have a friend who did the same thing with window form. What I need is to make this to a window service. The Window service program (printing controller service) will be used as a central printer controller. Depending on the condition, I will send the printing job to different printer on the network (the printer is installed on USB). It is already possible to do a test print, but when I list down the installed printers, these network printers are not listed. But in my friend's program, all

How to give print command to printer from Android app?

狂风中的少年 提交于 2019-11-30 09:36:10
问题 I have created a simple app in which I give print command to printer but nothing happens. Here is my code: new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub Socket socket; try { socket = new Socket("xxx.xxx.xx.21", 515); PrintWriter outputStream = new PrintWriter(socket.getOutputStream()); outputStream.println("\fThis is a test print"); outputStream.close(); socket.close(); } catch (UnknownHostException e) { // TODO Auto-generated catch block e