wood burning stoves 2.0*
The moose likes Java in General and the fly likes how to send a file from java for printing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to send a file from java for printing" Watch "how to send a file from java for printing" New topic
Author

how to send a file from java for printing

Srinath R
Ranch Hand

Joined: Jun 28, 2000
Posts: 71
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
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
A PrintJob object will invoke the native printer dialog for you.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Srinath R
Ranch Hand

Joined: Jun 28, 2000
Posts: 71
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"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
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");
 
jQuery in Action, 2nd edition
 
subject: how to send a file from java for printing
 
Similar Threads
Passing data from PDF form (made in acrobat writer) to a JSP
Sending pdf file to user
Urgent..Please reply...
Converting image into pdf file and displaying the pdf file.
Drag n Drop image on pdf file using java