printing

Zebra Printing with CUPS no print ZPL or EPL

孤人 提交于 2019-12-31 10:56:29
问题 I have a Zebra GK420d connect to OS X via CUPS. However, when I send files to it that are written in ZPL or EPL they are only printed in plain text. Am I required to change to mode on the printer? 回答1: Contrary to what others said, you don't need to specially add a raw queue. Instead, you can submit raw files into any queue using -o raw switch: lpr -P CupsPrinterName -o raw path/to/label.zpl Printer name can be found over that link in CUPS: http://localhost:631/printers/ This also works on

Zebra Printing with CUPS no print ZPL or EPL

佐手、 提交于 2019-12-31 10:55:29
问题 I have a Zebra GK420d connect to OS X via CUPS. However, when I send files to it that are written in ZPL or EPL they are only printed in plain text. Am I required to change to mode on the printer? 回答1: Contrary to what others said, you don't need to specially add a raw queue. Instead, you can submit raw files into any queue using -o raw switch: lpr -P CupsPrinterName -o raw path/to/label.zpl Printer name can be found over that link in CUPS: http://localhost:631/printers/ This also works on

Printing Receipt from Django Web Application

*爱你&永不变心* 提交于 2019-12-31 10:48:36
问题 I am developing a web-based POS. Unfortunately, POS must print thru a thermal receipt printer (TM-T88IV, Epson). The web application is based on Django. Is there any idea on how the system could automatically print a receipt whenever a user click a control in the web application? I was thinking of creating another services in python for that purposes, but that would defeat the purpose of having a web application, where all you need is browser, without any extra installation. The printer is

How to make print use desktop media queries?

爱⌒轻易说出口 提交于 2019-12-31 05:59:10
问题 I am attempting to add some print functionality to my page, but I am having an issue where when I print, it is printing as if it is mobile. How can I make it so that when someone hits print it prints the desktop version? $('.print-btn').click(function(e) { window.print(); }); .visible-desktop { display:none; } @media only screen and (min-width:768px) { .visible-desktop { display:block; } .visible-mobile { display:none; } } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery

printer spool monitor

[亡魂溺海] 提交于 2019-12-31 05:11:46
问题 I want to capture following attributes from print server spool on print of any page. i am able to capture 3 of 4 attributes through these APIs(FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification). but still i am not able to get data of file(so i can keep the thumbnail of this file by page by page) Computer Name - DONE User Name - DONE File Name -DONE Data of file -??? please suggest me some solution to achieve this. 回答1: Papercut does this. My Previous employer has been

Java printing. Prints only one page when using `Book` class

我与影子孤独终老i 提交于 2019-12-31 05:11:28
问题 I use Book class to provide different orientation to pages when printing PDF document. But when I use Book class prints only first page. Other pages doesn't printing. But Book#getNumberOfPages return me 4 . My code looks like this: public static getDoc(DocAttributeSet dset) { final PDFFile pdfFile = new PDFFile(buf); Book book = new Book(); for (int i=0; i<pdfFile.getNumPages(); i++) { PDFPage page = pdfFile.getPage(i); PageFormat pageFormat = new PageFormat(); if (page.getAspectRatio() >= 1)

Printing array of primitives in Java

戏子无情 提交于 2019-12-31 04:56:23
问题 I've got two arrays: char[] chars = { '1', '2', '3' }; int[] numbers = { 1, 2, 3 }; Why after calling System.out.print(chars) I'm getting 123 while after System.out.print(numbers) I've got smth like [C@9304b1 ? What is more, after printing System.out.print("abc" + chars) I'm also getting abc[C@9304b1 . I know that [C@9304b1 equals chars.toString() method but why sometimes System.out.print print only its elements? 回答1: PrintStream , the type of System.out , has several overloads for the print

ios 4.2 uiwebview javascript window.print doesn´t print, not launch before and after events

五迷三道 提交于 2019-12-31 04:56:09
问题 I´m using a uiwebview for doing an embedded web app, with the new iOS 4.2 you can print directly with objective-C, but I want to print from javascript in HTML. The problem is that I dont see the print dialog showing when clicking the button that executes window.print(). I have wrote also this code but it doesn't get events. function beforePrint () { alert("before rec"); } function afterPrint () { alert("after rec"); } function checks(){ alert("Activating checks"); window.onbeforeprint =

How to hide print dialog box in Flex?

∥☆過路亽.° 提交于 2019-12-31 04:41:47
问题 Is it possible to hide the printing dialog in flex? I'm using the class FlexPrintJob. Here's my code: var print:FlexPrintJob = new FlexPrintJob(); print.printAsBitmap = true; if ( print.start() ) { print.addObject( img as UIComponent, FlexPrintJobScaleType.SHOW_ALL ); print.send(); } 回答1: you can use start2() from the printjobs class import flash.printing.PrintJob; import flash.printing.PrintUIOptions; var myPrintJob:PrintJob = new PrintJob(); var uiOpt:PrintUIOptions = new PrintUIOptions();

Do modern browsers support onbeforeprint / onafterprint HTML events?

霸气de小男生 提交于 2019-12-31 03:57:14
问题 I am trying to update content of my page for printing. I want to have labels (spans) for each input element (textboxes, lists, etc.) to prevent text-cutoff when printing. I want to make sure before printing that all these labels reflect the most up-to-date user entered values from their respective input fields. My first idea was to just put a label after each textbox, and bind it with the same value on page render, and then hide/show the input or the label based on CSS media attribute. But