lpr

Brother QL-720NW specifying media size seems ignored

天涯浪子 提交于 2020-01-03 04:39:08
问题 The -o media=... is being ignored by the lpr command when printing on the Brother QL-720NW. I added custom paper sizes using: sudo brpapertoollpr_ql720nw -P QL720NW -n "62mm x 25mm" -w 62 -h 25 which works when setting the new size from within CUPS as default for the printer. This modified the ppd file and yields (in CUPS): Description: QL720NW Location: Driver: Brother QL-720NW CUPS v1.4 (grayscale) Connection: ipp://10.200.200.95/ipp/print Defaults: job-sheets=none, none media=om_br-l-0-b-3

placing PHP variable inside of shell_exec( ) to run lsp command

泪湿孤枕 提交于 2019-12-25 03:34:28
问题 When the url .../print.php loads, I want the name of the latest file uploaded to the target directory to be printed and for that same file to simultaneously be sent to the printer connected to the server. With this code here, I am able to do everything that I want ONLY when the shell_exec(lsp /file/path) refers directly to a file. I have a function set up that determines the latest file uploaded and also the filepath, but I want to do something like shell_exec(lsp $filepath). <?php $path = "

C# - LPR Command to Print PDF Files

我与影子孤独终老i 提交于 2019-12-24 11:05:51
问题 I am trying to run an LPR command to print a PDF. The code I'm using is being executed from a button click in a windows forms application. Code: var command = @"lpr –S 192.168.1.245 –P DAILY C:\Test.pdf"; ProcessStartInfo procStartInfo = new ProcessStartInfo("cmd", "/c " + command); procStartInfo.RedirectStandardOutput = true; procStartInfo.UseShellExecute = false; procStartInfo.RedirectStandardError = true; procStartInfo.CreateNoWindow = true; // start process Process proc = new Process();

LPR command to print pcl-file from windows service not working(Now a tray application)

不羁的心 提交于 2019-12-23 12:19:54
问题 I've been looking around for a while for a possible solution and explanation, but I can't find anything really. The following command is being run from a windows service. The same command does function if used directly in cmd. It does not return any errors or anything else for that matter. System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics

Concatenate string literals with DirectoryInfo enumeration and adding quotation marks.

风流意气都作罢 提交于 2019-12-11 13:35:52
问题 This seems like such an obscure question, but here it goes: Is there a way to concatenate String Literals with a DirectoryInfo enumeration (which contains a file path) while adding quotations around the file path? Further, how can I prevent backslashes from being doubled when converting a DirectoryInfo enumeration to a string? My situation is as follows: DirectoryInfo filePathDirectory = new DirectoryInfo(filePath); Process a = new Process(); a.StartInfo.FileName = "C:\\Windows\\system32\\lpr

print to a network printer using PHP

試著忘記壹切 提交于 2019-12-01 05:45:01
问题 is it possible to print directly to a network printer with PHP using LPR or something similar? any pointers? thanks. 回答1: Sure is. If you are on Linux do use LPR. exec("lpr -P 'printer' -r 'filename.txt'"); More on LPR commands. Take a look into LPR docs. You can easily show the print-queue and more from PHP. If you are on Windows use print exec("print /d:LPT2: C:\filename.txt"); More on print syntax Or take a look into this guide that has a deeper explanation of command-line printing. 回答2: /

Why can I not receive a response from a TCP/IP capable printer?

北战南征 提交于 2019-11-29 23:01:58
问题 My ultimate goal is to send a print job to a printer over the internet. The catch is that the printer is connected directly to a router, so I can't count on a computer processing anything. The path a print job takes is: Computer -> Internet -> Router -> Printer The printer is an Epson TM-T88V with the UB-E02 connect it module (it originally came with the 25-pin module). The router is a D-Link DIR-655 with port 9500 redirected to LAN port 9100 and the LAN IP address of the printer. With this

lpr command not working from my C# program in Win 7

孤人 提交于 2019-11-28 11:33:44
I have program that sends a file to a printer using 'lpr' command. I have installed Windows SDK 7.1. It is working fine in a 32 bit Windows 7 system but not working in 64 bit Windows 7. Process proc = new Process(); proc.StartInfo.FileName = "lpr"; proc.StartInfo.WorkingDirectory = GlobalConstants.outBaseDir; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.StartInfo.Arguments = " -S " + GlobalConstants.printerIP + " -P RAW " + filePath; proc.Start(); It throws an execption. I finally got the answer to my question. Step1: I had to enable "LPR Port Monitor". This can be done through

lpr command not working from my C# program in Win 7

廉价感情. 提交于 2019-11-27 06:13:39
问题 I have program that sends a file to a printer using 'lpr' command. I have installed Windows SDK 7.1. It is working fine in a 32 bit Windows 7 system but not working in 64 bit Windows 7. Process proc = new Process(); proc.StartInfo.FileName = "lpr"; proc.StartInfo.WorkingDirectory = GlobalConstants.outBaseDir; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.StartInfo.Arguments = " -S " + GlobalConstants.printerIP + " -P RAW " + filePath; proc.Start(); It throws an execption. 回答1: