printing

Printing in C# (wpf)

拈花ヽ惹草 提交于 2019-12-29 11:37:13
问题 I'm making a C# WPF program, and my program has to be able to print invoices, but I'm kinda struggling to find out how printing works in WPF... If I remember well from programming in winforms, there you'd use GDI+ to print. However, I assume that's not the case with WPF. I would be very happy if someone could point me in the right direction with some links to helpful documents or examples... 回答1: Printing in WPF is both simple and not so simple. But to point you to an introduction article,

Printing in C# (wpf)

怎甘沉沦 提交于 2019-12-29 11:36:45
问题 I'm making a C# WPF program, and my program has to be able to print invoices, but I'm kinda struggling to find out how printing works in WPF... If I remember well from programming in winforms, there you'd use GDI+ to print. However, I assume that's not the case with WPF. I would be very happy if someone could point me in the right direction with some links to helpful documents or examples... 回答1: Printing in WPF is both simple and not so simple. But to point you to an introduction article,

Print barcodes from web page to Zebra printer

夙愿已清 提交于 2019-12-29 10:17:19
问题 We're trying to print barcodes from a web page to our Zebra printer. I'm wondering if there's a way to print them using the printer's own font perhaps using web fonts or if I knew the font name used? I have been trying to use php barcode generators, that basically generates images containing the barcode. I have in fact been trying this approach for a few days already, without success. The problem is when I print them it's not readable by the scanners. I have tried to change the image

save high resolution figures with parfor in matlab

可紊 提交于 2019-12-29 08:59:32
问题 I am using parfor loop to produce and save quite big number of figures. Due to the amount of data which will be presented in the figures, the resolution of the figures need to be high, something around 920 dpi. Using the normal for , the function works fine. But when we switch to parfor the resolution of the produced and saved pictures becomes totally low. This is the figure handle creation part: mainFig=figure('visible','off'); set(mainFig, 'Renderer', 'OpenGL'); and here is the saving part

“page-break-inside: avoid ”- does not work

China☆狼群 提交于 2019-12-29 08:46:10
问题 I am making a print css... And i want to print certain blocks as a whole, therefore I used 'page-break-inside: avoid'. But this doesn't seem to work. I have been searching desperatly to find a solution... I use Google Chrome .print-block { display: block; page-break-inside: avoid !important; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px dashed black; } This is the CSS, I am using... 回答1: Only Opera fully supports page-break-inside . References: General Chrome specific Firefox

Send raw data to print not working

大憨熊 提交于 2019-12-29 08:15:21
问题 I want to send raw data to print, avoiding printer selection (fast print). I am trying to use this helper provided by Microsoft: https://support.microsoft.com/en-us/kb/322091#top However, when I call to the method: RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, s); My printer starts to works (makes some noise) but It never takes the white paper and starts to print. I have tried it with my two printers and the behavior is the same in both printers. Also I discard the

How to print a Windows Form without showing/displaying it

十年热恋 提交于 2019-12-29 07:58:11
问题 I am trying to print automatically a series of Windows-Forms. I don't need to show them. The code examples I found on the internet work only when I display the Form with show() ! I need to initialize the form with data and send it to the printer Here is the code I am using: public partial class Form2_withoutShow : Form{ PrintDocument PrintDoc; Bitmap memImage; public Form2_withoutShow (Data data) { InitializeComponent(); /* Initialize Data (texboxes, charts ect.) here */ this.PrintDoc = new

Window.print doesn't work in IE

霸气de小男生 提交于 2019-12-29 07:41:53
问题 I have to print out a div which I'm doing in the following way: function PrintElem(elem) { Popup(elem.html()); } function Popup(data) { var mywindow = window.open('', 'to print', 'height=600,width=800'); mywindow.document.write('<html><head><title></title>'); mywindow.document.write('<link rel="stylesheet" href="css/mycss.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.print(); mywindow

Window.print doesn't work in IE

你。 提交于 2019-12-29 07:41:52
问题 I have to print out a div which I'm doing in the following way: function PrintElem(elem) { Popup(elem.html()); } function Popup(data) { var mywindow = window.open('', 'to print', 'height=600,width=800'); mywindow.document.write('<html><head><title></title>'); mywindow.document.write('<link rel="stylesheet" href="css/mycss.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.print(); mywindow

Printing RichTextBox

纵然是瞬间 提交于 2019-12-29 07:13:17
问题 I am making a simple WinForms App and I wanted to allow the user to print the Text from RichTextBox. I followed MSDN link then.. And it works for a real printer (by real I mean that one I can touch:) ) But what if I want use some kind of PDF Printer? Then I must say it works when only one page is printed. Every next page is being printed on the same, first page , which means the text is being overprinted. This is obvious, but what I can do do force PDF Printer to create a new Page? This is my