printing

C# WebBrowser.ShowPrintDialog() not showing

☆樱花仙子☆ 提交于 2020-01-06 08:01:10
问题 I have this peculiar problem while wanting to print a html-report. The file itself is a normal local html file, located on my hard drive. To do this, I have tried the following: public static void PrintReport(string path) { WebBrowser wb = new WebBrowser(); wb.Navigate(path); wb.ShowPrintDialog() } And I have this form with a button with the click event: private void button1_Click(object sender, EventArgs e) { string path = @"D:\MyReport.html"; PrintReport(path); } This does absolutely

How do I send control characters to a Windows printer in Crystal Reports?

断了今生、忘了曾经 提交于 2020-01-06 07:56:47
问题 We are trying to build a Crystal Report that sends control characters directly to the printer, without going through the (buggy) Windows driver for that printer. Does anyone know a way to do this from within a Crystal Report? The specific control character we are trying to send is CHR(2). However when we put that in a Crystal Report, and print to a Generic Text Only printer, it is converting the character to a period on output. The character appears as a box in Crystal's preview, so I suspect

How do I send control characters to a Windows printer in Crystal Reports?

强颜欢笑 提交于 2020-01-06 07:56:15
问题 We are trying to build a Crystal Report that sends control characters directly to the printer, without going through the (buggy) Windows driver for that printer. Does anyone know a way to do this from within a Crystal Report? The specific control character we are trying to send is CHR(2). However when we put that in a Crystal Report, and print to a Generic Text Only printer, it is converting the character to a period on output. The character appears as a box in Crystal's preview, so I suspect

Printing a bitmap on a TSC printer

假如想象 提交于 2020-01-06 07:42:23
问题 I try to print image on tsc tdp-225 printer using the android device via OTG. This is example from documentation for printing simple bitmap image on tsc printer . This is my implementation . And this is what the printer has printed Maybe someone has already encountered this problem. Printing a monochromatic bitmap using PUTBMP also does not work. 回答1: fun String.hexStringToByteArray(): ByteArray { val hexStr = this.replace("-", "") var result = ByteArray(hexStr.length / 2, {0}) for(i in 0

Convert react-barcode to pdf format to print

时光怂恿深爱的人放手 提交于 2020-01-06 07:04:09
问题 I'm trying to print generated barcode but it prints as [object, object] tried using JSON.stringify and all other sources that i got but didn't work. Could someone suggest what is the best way to do this. var printWindow = window.open('', '', 'height=400,width=800'); printWindow.document.write('<html><head><title>DIV Contents</title>'); printWindow.document.write('</head><body >'); for(var i=0; i<selectedRows.length;i++){ printWindow.document.write( <Barcode value="Rakesh"//{this.state.value}

Convert react-barcode to pdf format to print

孤街浪徒 提交于 2020-01-06 07:02:07
问题 I'm trying to print generated barcode but it prints as [object, object] tried using JSON.stringify and all other sources that i got but didn't work. Could someone suggest what is the best way to do this. var printWindow = window.open('', '', 'height=400,width=800'); printWindow.document.write('<html><head><title>DIV Contents</title>'); printWindow.document.write('</head><body >'); for(var i=0; i<selectedRows.length;i++){ printWindow.document.write( <Barcode value="Rakesh"//{this.state.value}

SendFile over TCP/IP .NET CF

大城市里の小女人 提交于 2020-01-06 06:53:06
问题 I would like to send a file ("Label.prn") from a Windows Mobile 6.5 Device to a printer. This happens over TCP/IP. I have realized this application as a test on a normal Desktop-Client. It is very simple and easy. Just send the file over the TCP Socket and the printer does its job. Here is the desktop client demo (works just fine): private void buttonSend_Click(object sender, EventArgs e) { TcpClient client = new TcpClient(AddressFamily.InterNetwork); client.Connect(IPAddress.Parse("192.168.1

Not able to use PrintDocument in IIS

六月ゝ 毕业季﹏ 提交于 2020-01-06 05:16:05
问题 I am running an asp.net application's app pool under my ID which has access to Printer. Below is my code which uses DrawString to print a string generated from code. PrintDocument pd = new PrintDocument(); pd.PrinterSettings.PrinterName = @"\\aPrint\0007-BOND"; pd.PrintPage += new PrintPageEventHandler(pd_PrintPage); pd.Print(); and pd_PrintPage is defined below private void pd_PrintPage(object sender, PrintPageEventArgs ev) { try { System.Drawing.Font f = new System.Drawing.Font("Courier New

Printing multiple file types using java

末鹿安然 提交于 2020-01-06 04:51:13
问题 Hey i was wondering if there is a specific api for printing a bunch of common file types(pdf,doc,docx,txt, etc..). I am trying to develop program similar to HP's eprint. eprint annoys me because it prints an email as well as the file attached to it. I just want something i can send files directly to. I have found that java has a printing api, but that seems to focus on printing something from a gui window. any ideas much appreciated! Thanks Morpheous 回答1: It would be difficult for Java alone

0 is added but not shown as two digit when converted to int

Deadly 提交于 2020-01-05 07:10:11
问题 I want to add a 0 in front of a date if it is single digit. So I made a code: public class Zero { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String zero="0"; Calendar cal = new GregorianCalendar(); int day1 = cal.get(Calendar.DAY_OF_MONTH); String seven1=Integer.toString(day1); System.out.println(""+seven1); System.out.println(""+day1); String added=zero.concat(seven1); System.out.println(""+added); int change=Integer.parseInt(added);