• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to send a file from java for printing

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
some series of doubts kindly respond.
firstly i want to know if v have the overlaying concept in java(by saying overlaying i meen overlaying one file over the other for example- text file over some image file or some thing like that).
if this is possible - then can v create a file type which can be only opened by the application that v have created.
can v detect the printers that are avilable on the network useing a java program.
can v conver a file to acrobat file useing the java code.(thier is some thing called the acrobat writer which acts as a pdf writer and can be used to create the pdf file but my problem is how to send this file which is created by the java code to this pdf writer).
tnx
srinath
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A PrintJob object will invoke the native printer dialog for you.
 
Srinath R
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
thank u Cindy , i would have been happier if u would have suggested me some ways to go bout he rest of the problems.
PrintJobs solves one problem, my major problem is i wanted to know if v have the overlaying feature in java, and can i create a pdf file useing java application.
expecting a responce.
srinath
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gee, your confidence in me is touching. But the reason that I didn't answer the other questions is that I don't know the answers.
1) I am sure that you can overlay a printed page on an image. I just have never tried to figure out how to do it.
2) I doubt if you can create a file that can ONLY be opened by your application. Could be possibly trying for security? Perhaps you need to look into encryption. There is a Cryptography API available in java.
3) Use a PrintJob
4) Find the name of the PDF writer program and try invoking it with your file as an input parameter using the syntax:
Runtime.getRuntime().exec("notepad.exe input.txt");
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic