printing

POS: get a website to print directly to a defined local printer/s

隐身守侯 提交于 2019-12-29 03:32:06
问题 I have a website which runs a box office service which issues tickets and reports. I am trying to figure out how to get tickets (currently PDFs) sent directly to a specified printer on a local/client PC. I have followed many old/dead/useless links and have not found any up-to-date solutions to this although many tantalising glimmers of hope. The scenario is this: Remote hosted website - 1 or more users connected - web page generates ticket/s (PDF) which is sent to a specified printer on the

How to set Safari print margins via CSS to print borderless

痞子三分冷 提交于 2019-12-29 03:13:19
问题 I want to print a webpage to PDF without any margins in Safari. Page size is set to 'A4 borderless' in the print dialogue. Whatever I seem to do, Safari on OSX is adding an extra margin around my HTML. Check 'print backgrounds' to see what I mean. Clearly the @page-rule has no effect for Safari, but are there any other ways? http://jsfiddle.net/willemvb/psFHC/ @page { size: 21cm 29.7cm; /*A4*/ margin: 0; /*webkit says no*/ } html{ margin: 0; padding: 0; width: 100%; } body { margin: 0;

Dot Matrix printing in C#?

☆樱花仙子☆ 提交于 2019-12-29 03:12:53
问题 I'm trying to print to Dot Matrix printers (various models) out of C#, currently I'm using Win32 API (you can find alot of examples online) calls to send escape codes directly to the printer out of my C# application. This works great, but... My problem is because I'm generating the escape codes and not relying on the windows print system the printouts can't be sent to any "normal" printers or to things like PDF print drivers. (This is now causing a problem as we're trying to use the

What is the difference between `>>> some_object` and `>>> print some_object` in the Python interpreter?

拥有回忆 提交于 2019-12-29 01:40:20
问题 In the interpreter you can just write the name of an object e.g. a list a = [1, 2, 3, u"hellö"] at the interpreter prompt like this: >>> a [1, 2, 3, u'hell\xf6'] or you can do: >>> print a [1, 2, 3, u'hell\xf6'] which seems equivalent for lists. At the moment I am working with hdf5 to manage some data and I realized that there is a difference between the two methods mentioned above. Given: with tables.openFile("tutorial.h5", mode = "w", title = "Some Title") as h5file: group = h5file

printing to pdf

删除回忆录丶 提交于 2019-12-29 00:47:48
问题 The existing system has many reports . Using a free pdf printer like dopdf or cutepdf the user can open the report , choose the pdf printer , type in the filename and save the report as a pdf file.This seems a bit tedious It would be nice to have the report directly saved as a pdf file just on click of a button. Unfortunately the reporting tool component doesnt have pdf export functionality. . Is there a way to programatically do this function using a third party component. The printing

ERROR_WRONG_LABEL when trying to print wireless using Android Brother Sdk for label printer

孤人 提交于 2019-12-29 00:47:47
问题 I have trying to print using labels from my android app which using wifi commands Brother QL-720NW label printer . Since I performed factory reset on the printer , I'm getting this error Problem: ERROR_WRONG_LABEL( means wrong roll specified in the sdk guide) error is thrown on print command, since I performed factory reset on the printer . CODE: void printTemplateSample() { Printer myPrinter = new Printer(); PrinterInfo myPrinterInfo = new PrinterInfo(); try{ // Retrieve printer informations

@page :first { margin: … } in Chrome bug?

人走茶凉 提交于 2019-12-28 16:55:20
问题 Referring to the full fiddle at: http://jsfiddle.net/XT92a/ @page { margin: 1in; } @page :first { margin: 2in 1in 3in 3in; } I expect the above rule to make the first printed page have certain margins and all other pages have 1 inch margins. Instead, I get the following in Chrome's print preview (accurate to the printed output). The margins are different on the non-first pages, but they are not correct. Commenting out the :first margin rule allows the non-first pages to print with the correct

How to use QPrinter and QPrintPreviewDialog

青春壹個敷衍的年華 提交于 2019-12-28 16:15:22
问题 I want to preview, and then print, a report through a printer using PyQt. I tried the following code : printer = QtGui.QPrinter() doc = QtGui.QTextDocument("testing") dialog = QtGui.QPrintDialog(printer) dialog.setModal(True) dialog.setWindowTitle("printerrr") pdialog = QtGui.QPrintPreviewDialog(printer) pdialog.setWindowFlags(QtCore.Qt.Window) pdialog.exec_() How I can preview my report then print it? 回答1: Basic demo of Qt's print dialogs: PyQt4 import sys, os from PyQt4 import QtGui, QtCore

Delphi: How to print a PDF without showing it?

ぃ、小莉子 提交于 2019-12-28 11:54:07
问题 I have been looking online for some time now, but I still haven't figured out how to print a PDF file in Delphi without showing the document itself, or a print dialog. I just want to open a file without showing it, and print it to the default printer. I'm trying to print a batch of PDF documents, and there is no need for user interference. 回答1: There are some different possibilities to print PDFs... it depends whether you can require Adobe Reader to be installed (I don't know if you want to

Delphi: How to print a PDF without showing it?

前提是你 提交于 2019-12-28 11:54:01
问题 I have been looking online for some time now, but I still haven't figured out how to print a PDF file in Delphi without showing the document itself, or a print dialog. I just want to open a file without showing it, and print it to the default printer. I'm trying to print a batch of PDF documents, and there is no need for user interference. 回答1: There are some different possibilities to print PDFs... it depends whether you can require Adobe Reader to be installed (I don't know if you want to