network-printers

Print to Zebra printer in php

旧时模样 提交于 2019-11-30 05:31:33
Looking for the proper code to print from php web page to a zebra IP printer using RAW port 9100. Does anyone know if this is possible? I need to send a string in ZPL formatted output direct to ZM400 label printer. I've searched high and low, the closest I've found is this: Print directly to network printer using php It seems very close to what I need, but when my php page hits that code, it doesn't do anything. Here's the code I used: <?php $handle = printer_open('\\\\192.168.2.206:9100\\'); printer_set_option($handle, PRINTER_MODE, "RAW"); printer_write($handle, "TEXT To print"); printer

How to give print command to printer from Android app?

不打扰是莪最后的温柔 提交于 2019-11-29 16:12:46
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.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } })

Print to Zebra printer in php

大兔子大兔子 提交于 2019-11-29 05:43:08
问题 Looking for the proper code to print from php web page to a zebra IP printer using RAW port 9100. Does anyone know if this is possible? I need to send a string in ZPL formatted output direct to ZM400 label printer. I've searched high and low, the closest I've found is this: Print directly to network printer using php It seems very close to what I need, but when my php page hits that code, it doesn't do anything. Here's the code I used: <?php $handle = printer_open('\\\\192.168.2.206:9100\\');

Programmatically “hello world” default SERVER-side printer in ASP.NET MVC

六月ゝ 毕业季﹏ 提交于 2019-11-29 00:10:58
I have the printer installed and working on an intranet server and I want to programmatically send "hello world" to that default printer. This seems like the simplest thing but I've been googling for a couple hours with no success. (note: I am developing asp.net mvc on the deployment machine itself which is running Windows 7) I tried to translate an example from VB here into C# but it said "no printers are installed". public void TestPrint() { var x = new PrintDocument(); x.PrintPage += new PrintPageEventHandler(PrintPage); x.Print(); } private void PrintPage(Object sender, PrintPageEventArgs

PHP to Zebra Printer

可紊 提交于 2019-11-28 19:44:09
I have this Zebra ZM400 Printer connected to the network ( 192.168.1.50 ). And I am trying to push a content to this printer directly from PHP. This is the idea and I am just stuck without any way to do this. I tried the file_put_contents('192.168.1.50', $content) but with no success. Would appreciate if anyone could please help me in sorting out this. Thank you :-) ................................................................................................................................. Solution: I printed using the LPR Protocol. No need to install driver or anything. The LPR Printing

printing over network from PHP app

风格不统一 提交于 2019-11-28 07:02:55
I have a set of printers connect over a network with Static IP assigned to each printer. Now i have a PHP web application running on a linux server which needs to send print jobs, to these printer over the network. Is this possible using lpr or cups and how do i go about it. You could use the LPR Printer class from here: http://www.phpclasses.org/package/2540-PHP-Abstraction-for-printing-documents.html Example: <?php include("PrintSend.php"); include("PrintSendLPR.php"); $lpr = new PrintSendLPR(); $lpr->setHost("10.0.0.17"); //Put your printer IP here $lpr->setData("C:\\wampp2\\htdocs\\print\

Printing using IPP without drivers (IPP Client)

Deadly 提交于 2019-11-28 05:08:37
I have a device/appliance that you cannot install drivers for. I would like to add the ability to support network/IPP/AirPrint printers by having the user add the IP Addresses. Since I am not printing through windows (which would use the IPP), how do I use IPP myself? Is there a c# client (or any windows library) out there that allows you to interact with IPP printers with the IPP protocol? There are a few IPP-Client implementations and IPP Libraries available for different programming languages (java/php/python). A practical solution could be to use the ipptool available at http://cups.org

Error “Settings to access printer 'printername' are not valid” when printing from Windows service

旧城冷巷雨未停 提交于 2019-11-27 22:16:32
问题 I get the error mentioned when printing to a network printer. The error does not occur when run under XP/Win2003, in a WinForm app or when a local printer is used. The error does only occur when run as a Windows Service under Vista/Win7/Win2008 and printing to a network printer. The Windows service runs under a network user that has access to the network printer. Before I print I check if the printername (including network path) is ok by looping through the available printers. How can this be

Send text file directly to network printer

时光毁灭记忆、已成空白 提交于 2019-11-27 21:41:08
I have currently-working code which sends raw data to a printer by writing a temporary file, then using File.Copy() to send it to the printer. File.Copy() supports both local ports, like LPT1 and shared printers like \\FRONTCOUNTER\LabelPrinter . However, now I'm trying to get it working with a printer that's directly on the network: 192.168.2.100 , and I can't figure out the format to use. File.Copy(filename, @"LPT1", true); // Works, on the FRONTCOUNTER computer File.Copy(filename, @"\\FRONTCOUNTER\LabelPrinter", true); // Works from any computer File.Copy(filename, @"\\192.168.2.100", true)

Programmatically “hello world” default SERVER-side printer in ASP.NET MVC

霸气de小男生 提交于 2019-11-27 21:24:22
问题 I have the printer installed and working on an intranet server and I want to programmatically send "hello world" to that default printer. This seems like the simplest thing but I've been googling for a couple hours with no success. (note: I am developing asp.net mvc on the deployment machine itself which is running Windows 7) I tried to translate an example from VB here into C# but it said "no printers are installed". public void TestPrint() { var x = new PrintDocument(); x.PrintPage += new