This content has been marked as final. Show 2 replies
BrigitAnanya wrote:It's not relevant what you'd like, since it is not your computer. If the user wants to print to file, that is their business.
I developed a computer graphics drawing program, and, since I allow File>Save,
I would like that my File>Print doesn't have a "Print to file" option.
As it happens I have a computer with no printer. I often 'print to file' then load the file onto a portable disk to transport to a computer with a printer (but no Java).
Well, in this case I would like to use my code for making a pdf file when
the user chooses "print to File".
I just add my code at
if (jobAttributes.getDestination() == JobAttributes.DestinationType.FILE)
However, the file that gets saved automatically gets the name "out.prn",
and I would like to name it out.pdf or at least allow Save as "pdf".
How could I do this?
Also, even though I can save the file on the C drive, it doesn't allow to
save the file on the desktop or in "My Documents".
When I try that, I get the message:
Cannot write to file ...\out.prn.
How can I solve this?
Is it really true that I cannot get rid of the "Print to file" option? Why did
not do that? My users really don't need to use "Print to file", since they
can use "Save as" and print the file on another computer.
Thanks for any response!