printing

How to disable console echoing

点点圈 提交于 2019-12-24 22:00:57
问题 I'm writing a command line program that makes use of println to display text in a very specific format. The problem I encounter is that every time I ask the user to enter something via Scanner.nextLine(), the console automatically echos their input in the console. Is there a way to disable the console from immediately displaying the user's entered text? In case it matters, I am running Linux. 回答1: You can use the Console class and readPassword() method that comes with Java since version 6.

Unable to print in Bluej console using PrintWriter

假装没事ソ 提交于 2019-12-24 21:15:37
问题 Consider the following code- import java.io.*; public class test { public static void main(String[] args) { PrintWriter out= new PrintWriter(System.out); out.println(1); out.close(); } } I run it on bluej for the first time and get output 1 on console. On running it again i get no output at all and same is the case for any subsequent tries. Would love to know why this is happening. 回答1: Ok, the problem why this method only works once is, that the PrintWriter.close() method also closes the

Window.print() does not take the current url

纵饮孤独 提交于 2019-12-24 19:46:56
问题 I am using the following code. According to this code, new window will open with the source of url given. But when printing, it is showing about:blank is printing. The page loads correctly. Before loading, the page url is also about:blank. But it changes to the given url soon. var url="http://localhost:8080/hiring/docs/Keneth%20_1340800082258/Keneth%20_resume_1340800082258.pdf"; var printwindow = window.open(url, '_blank', 'fullScreen=yes'); //setTimeout('2000'); printwindow.focus();

Direct Print webpage in PDF file

£可爱£侵袭症+ 提交于 2019-12-24 19:27:50
问题 In my site i m fetching my mysql data by using PHP. I want open that data in pdf file when i click pdf print button is it possible? 回答1: First of all, if you want a high quality professional product to do that. You want Prince XML If you are looking into some open source tool to achieve something similar. You can look into this SO question. 回答2: You could prepare static PDF form file, that just fill it in with values using PHP's FDF module. 回答3: It depends which platform are you using. This

Java Print API skipping first page

那年仲夏 提交于 2019-12-24 19:09:11
问题 I need some advice with the Java Print API. I have a program that goes through a Vector and prints each item on its own line. I'm trying to make it so when the line count reaches a certain number, it starts a new page. I've been looking at a Java Tutorial example to figure it out, but it's still not working. In debug mode, everything appears to be working properly, but for some reason it's printing the second page on the first sheet of paper and leaving the second sheet blank. Does anyone

Is there an easy way for users to print Flash (Open Flash Charts) from their browser?

自作多情 提交于 2019-12-24 18:25:11
问题 Is there any easy way to print Flash Charts (Open Flash Charts 2) within a web page. Flash doesn't seem to print at all. I'm maintaining a health site for a client, and we use Open Flash Charts to draw multiple line charts for patients dynamic data. The client would like for patients to be able to easily print these charts, although Flash doesn't appear to be printable (unless I'm missing something). Unfortunately I can't provide a link to the page as an example at the moment as the patient

How to print documents using Java?

泪湿孤枕 提交于 2019-12-24 17:26:05
问题 I have a requirement to print data exactly in a particular position in paper. How can these kind of formatting be done using Java? 回答1: Jasper, iText will work for you. 回答2: Which kind of data ? If it's form, the use of reporting library can help you: http://jasperforge.org/projects/jasperreports If it's graphic you can try using 'raw' java api: http://download.oracle.com/javase/tutorial/2d/printing/printable.html 回答3: Or use the Java print API: http://www.ibm.com/developerworks/java/library

How to print documents using Java?

蹲街弑〆低调 提交于 2019-12-24 17:23:24
问题 I have a requirement to print data exactly in a particular position in paper. How can these kind of formatting be done using Java? 回答1: Jasper, iText will work for you. 回答2: Which kind of data ? If it's form, the use of reporting library can help you: http://jasperforge.org/projects/jasperreports If it's graphic you can try using 'raw' java api: http://download.oracle.com/javase/tutorial/2d/printing/printable.html 回答3: Or use the Java print API: http://www.ibm.com/developerworks/java/library

Printing in landscape from a Windows Forms WebBrowser control

社会主义新天地 提交于 2019-12-24 16:17:57
问题 I have a WebBrowser control in a Windows Forms Host in a WPF application. I know that in order to print it's contents, I use simply WebBrowser.Print() , however, how can I tell the printer to print the contents in landscape rather than a portrait orientation? I've been searching the Internet on this and oddly enough, it seems to be actually something that is a bit hard to do -- is this really the case? It seems odd to me that it wouldn't be easily implementable. Thanks! 回答1: INFO:

Fullcalendar Month View - adjust to actual number of weeks in month

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 16:16:18
问题 Using latest fullcalendar.io, the number of weeks that are displayed in month view is appropriate for the first month that renders. When using the prev/next buttons, if the next/prev month has less weeks than the current month, it still renders the current month's number of weeks. Right now it's May 2015. The demo on the site is here: http://fullcalendar.io/js/fullcalendar-2.3.1/demos/gcal.html May 2015 renders with 6 weeks, because that's how many are needed. When I click next to go to June