printing

How do I use LocalPrintServer to target a specific printer?

心已入冬 提交于 2020-01-01 06:06:51
问题 Following this question: How do I retrieve a list or number of jobs from a printer queue? I'm still stuck on how to target a specific printer of which I currently only know the name using the LocalPrintServer class. The application is supposed to print to several machines at once and all printspoolers need to be monitored separately. Can anyone provide me with a code snippet that shows how I can instantiate a LocalPrintServer object using only the name of the printer? Thanks in advance! Edit:

PHP printing to local Thermal Printer, does not work without networkname

孤人 提交于 2020-01-01 05:45:08
问题 I've build a POS (Point of Sale) application in PHP that can print directly to a thermal printer. In most cases i run the application on a local webserver using WAMP. Part of the printing code is: $printer = "\\\\localhost\\TM-T88V"; // Open connection to the thermal printer $fp = fopen($printer, "w"); if (!$fp){ die('no connection'); } $data = " PRINT THIS "; // Cut Paper $data .= "\x00\x1Bi\x00"; if (!fwrite($fp,$data)){ die('writing failed'); } This code works fine as long as the PC is

How to add print dialog to the printpreviewdialog?

只愿长相守 提交于 2020-01-01 05:42:09
问题 My boss wants me to create the window form that has printing function, but he wants to print the datagridview after preview. So now I encourage the problem, I cannot print multiple set of paper or choose the printer or make any changes when click the print button on printpreviewdialog .When I click the button, it will direct print the paper. So I wish to join the printpreviewdialog and printdialog . Why the printpreviewdialog and printdialog can only be used in different buttons? It's lack of

Portable way to determining of printer is physical or virtual

☆樱花仙子☆ 提交于 2020-01-01 05:29:04
问题 I need direct-to-printer functionality for my website, with the ability to distinguish a physical printer from a virtual printer (file). Coupons.com has this functionality via a native binary which must be installed by the user. I'd prefer to avoid that. SmartSource.com does it via Java applet: Does anybody know how this is done? I dug through that Java APIs a bit, and don't see anything that would let you determine physical vs virtual, except looking at the name (that seems prone to

Best Practice for Writing a POS System

偶尔善良 提交于 2020-01-01 04:12:25
问题 I'm putting together a basic Point of Sale (POS) system in C# that needs to print to a receipt printer and open a cash drawer. Do I have to use the Microsoft Point of Service SDK? I've been playing around with printing to my Samsung printer using the Windows driver that came with it, and it seems to work great. I assume though that other printers may not come with Windows drivers and then I would be stuck? Or would I be able to simply use the Generic/Text Driver to print to any printer that

bootstrap printing width

青春壹個敷衍的年華 提交于 2020-01-01 03:56:29
问题 I'm using bootstrap in an app and as you can see (below) when printing the browser (left side) is using a really small width when printing (right) so the responsive layout is moving all the right site elements below the left side ones and the printing version won't fit in one single page. Do you know how can I force the browser to keep the right width? Thanks, Remo . 回答1: I had a very similar problem. Ensuring the responsive css is enabled only for media="screen" solved it. <link href="assets

How to use esc/pos command with c#?

梦想与她 提交于 2020-01-01 00:46:12
问题 How to use ESC/POS command with C#? I need format like this but I cannot achieve this format. I tried some codes ,but no use. using (var ms = new MemoryStream()) using (var bw = new BinaryWriter(ms)) { // Reset the printer bws (NV images are not cleared) bw.Write(AsciiControlChars.Escape); bw.Write('@'); bw.Write(AsciiControlChars.Newline); bw.Write(AsciiControlChars.Escape); bw.Write("_______________________________________________"); bw.Write(AsciiControlChars.Newline); bw.Write("Service

printing QR codes through an ESC/POS thermal printer?

二次信任 提交于 2019-12-31 22:24:29
问题 I'm printing some QR codes (from a Ruby script) writing ESC/POS commands to a Epson TM-T20 thermal printer. BTW, I'm writing a simple ESC/POS commands printer "driver". The printer I'm using an Epson TM-T20 (USB interface) I'm doing some tests from a Windows 7 host, using serialport gem. All fine about writing ESC/POS commands for print formatted texts and also linear barcodes, but I have problems uinderstanding the command protocol to print QR CODES, using the only available documentation

printing QR codes through an ESC/POS thermal printer?

Deadly 提交于 2019-12-31 22:23:12
问题 I'm printing some QR codes (from a Ruby script) writing ESC/POS commands to a Epson TM-T20 thermal printer. BTW, I'm writing a simple ESC/POS commands printer "driver". The printer I'm using an Epson TM-T20 (USB interface) I'm doing some tests from a Windows 7 host, using serialport gem. All fine about writing ESC/POS commands for print formatted texts and also linear barcodes, but I have problems uinderstanding the command protocol to print QR CODES, using the only available documentation

How can I count CSS page breaks for printed HTML?

纵饮孤独 提交于 2019-12-31 17:28:47
问题 I am generating reports using HTML and I am using CSS to control the page breaking using page-break-after, etc. I have given the user the option to print multiple reports at once, which I create as sections of a single dynamically generated HTML document. Making it a single document allows it to be a single print job to avoid print spooling issues. My problem is this: I would like to number the pages of a section of the larger dynamic HTML in the format "page x of n". However, if I let the