printing

Int cannot be converted to boolean?? converting code from C to Java

不打扰是莪最后的温柔 提交于 2019-12-23 03:39:01
问题 I have a code that I am converting into Java, Im new to programming but I already have done some work on both PL, although I do not understand why I get this error The original C code is: #include <stdio.h> #include <conio.h> int main () { int i, j, k; for (i=1; i<=59; i++) { k = 1; for (j=2; j<i; j++) if (i % (j*j) == 0) k = 0; if (k) printf ("%d\n", i); } printf("%d",i); getch(); } My converted Java code: import java.util.*; public class squarefree { public static void main(String[] args) {

How to print the datagridview results in vb.net?

試著忘記壹切 提交于 2019-12-23 03:31:51
问题 I have a datagridview on a form and a print button below it...i want that when i click the print button the print dialog should appear and the datagrid results should be printed...How can it be done??Can anyone tell me?? 回答1: <a href="JavaScript:window.print();">Print this page</a> You might also want to investigate using separate stylesheets for printing and screen by using the media attribute. This will provide better printing results. 来源: https://stackoverflow.com/questions/7235853/how-to

Print image from Javascript

百般思念 提交于 2019-12-23 03:17:25
问题 i have some images .... the size of each image is different For example: img1 = 200 x 1900 img2 = 1800 x 400 img3 = 600 x 800 // HTML <html> <body> <img src='img1.jpg'> <img src='img2.jpg'> <img src='img3.jpg'> </body> </html> // javascript var mywindow = window.open('', 'my div'); mywindow.document.write('<html><head><title>my div</title>'); mywindow.document.write('</head><body >'); data = "<img src='img1.jpg'><img src='img2.jpg'><img src='img3.jpg'>"; mywindow.document.write(data); // data

thermal printer java

≯℡__Kan透↙ 提交于 2019-12-23 03:12:30
问题 Please help trying to print in a thermal printer using this code, I get a print job in my system tray but my thermal printer doesnt print. PrintReceiptUtil class: import java.awt.JobAttributes; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import javax.print.Doc; import javax.print.DocFlavor; import javax.print.DocPrintJob; import javax.print.PrintException; import javax.print.PrintService; import javax.print.PrintServiceLookup; import javax

Printing viewport

空扰寡人 提交于 2019-12-23 03:06:32
问题 C# wpf 3D visual studio 2010 net 4.5 Hi I am trying to print out the 3D image I have created but can not get it right. The image that is printed is changing in size depending on how large the window is etc. or it is clipped etc. What I would like is to print the view port on the printer, stretching it so wide as the paper is and keeping aspect ration. PrintDialog dialog = new PrintDialog(); if (dialog.ShowDialog() != true) { return; } StackPanel myPanel = new StackPanel(); myPanel.Margin =

Printing viewport

江枫思渺然 提交于 2019-12-23 03:05:58
问题 C# wpf 3D visual studio 2010 net 4.5 Hi I am trying to print out the 3D image I have created but can not get it right. The image that is printed is changing in size depending on how large the window is etc. or it is clipped etc. What I would like is to print the view port on the printer, stretching it so wide as the paper is and keeping aspect ration. PrintDialog dialog = new PrintDialog(); if (dialog.ShowDialog() != true) { return; } StackPanel myPanel = new StackPanel(); myPanel.Margin =

How to listen to printing jobs in java

蓝咒 提交于 2019-12-23 02:59:15
问题 I want to know how to see get the printing details which any other application (Word, Excel, PDF readers) sent to the printer in a Java application. That means, the user send various types of documents to printers from one PC. My Java application must count how many documents sent to printers. How can I get these details in a Java SE application? Any resource, useful link, guidance highly appreciated. 回答1: This cannot be directly done using Java but there is a workaround. For each print job

Printing with an Eclipse RCP program

别等时光非礼了梦想. 提交于 2019-12-23 01:05:37
问题 I am looking for a good, standard way to generate "output" in my RCP programm and print it. This should work as it works on Windows, Mac OS and Linux with the standard print dialog. I am aware of the Birt project, but I could not find any hints about how to implement it within a RCP programm and how to invoke the standard print dialog and how to pass the Birt generated report to the printer. Happy for all hints. 回答1: I believe the Birt project used to use IText. (now ITextPDF) The other

Printing with EPL via PHP: Storing Images

一曲冷凌霜 提交于 2019-12-23 00:09:47
问题 Background Information: Mac OS X Lion 10.7.3 (11D50b) EPL: http://en.wikipedia.org/wiki/Eltron_Programming_Language EPL Manual: http://www.geksagon.ru/i/2/EPL2_Manual.pdf I am connecting to the printer via a 2-port serial to Ethernet server. Printer Config Readout: UKQ1935H U UPS V4.14 S/N: 64A024100181 Serial port:96,N,8,1 Image buffer size:0245K Fmem:001.0K,059.9K avl Gmem:000K,0058K avl Emem:010K,0058K avl I8,C,001 rY S4 D10 R000,000 ZT UN q832 Q609,24 Option:D oUs,t,u 10 19 29 Using PHP I

Printing with EPL via PHP: Storing Images

本小妞迷上赌 提交于 2019-12-23 00:09:25
问题 Background Information: Mac OS X Lion 10.7.3 (11D50b) EPL: http://en.wikipedia.org/wiki/Eltron_Programming_Language EPL Manual: http://www.geksagon.ru/i/2/EPL2_Manual.pdf I am connecting to the printer via a 2-port serial to Ethernet server. Printer Config Readout: UKQ1935H U UPS V4.14 S/N: 64A024100181 Serial port:96,N,8,1 Image buffer size:0245K Fmem:001.0K,059.9K avl Gmem:000K,0058K avl Emem:010K,0058K avl I8,C,001 rY S4 D10 R000,000 ZT UN q832 Q609,24 Option:D oUs,t,u 10 19 29 Using PHP I