• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

redirect output to printer

 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. I have a program that prints "Hello World" in java. I want to redirect the output to my printer (and not to the console). How do I do that?
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, just to give you a background of the problem

My friend has a program written in FoxPro (remember?) that takes few inputs from the user, performs some calculations and formatting and prints a nice label on the invoice sheet (prints the calculated variables at a predefined x-y pos.)

something like:




I am trying to do the same using Java. Since my friend lives in a different geographical location and I dont know the exact x-y positions of where to print the variables, I took the following approach:



where format.bsh contains something like



I took this approach because I thought this would give my friend a good control over the format of the output variables (He can adjust them according to his needs).

Does this sound like a good approach?
[ January 30, 2007: Message edited by: Richard Green ]
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or do you think Apache Velocity is a better fit (than BSH) for my requirements ?

or am i out of my mind and thinking in the wrong direction...
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any one?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic