cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a file top the default printer?

Former Member
0 Kudos

Hello,

I have generated, using Java code, a certain HTML file and wrote it to a certain location on my local machine. I would like now to automatically send this file for the default printer for printing, this way the user won't have to manually open the file and select

file->print from the browser window and then print it.

How can I acomplish this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check out this link to know about printing a HTML document as it should display.

http://www.codecomments.com/archive257-2004-5-197072.html

Regards,

Uma

Former Member
0 Kudos

10X, I'll check it out...

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

good

how can you identify which file you r going to print and which file you r going to print.if you r going to print all the file from that particular location than you can do it through jsp, but i dont think it can be done automatically, the user has to select the particular location where you have stored the file in you hard disk and i will go for printing.

Thanks

mrutyun

Former Member
0 Kudos

Hello,

Let's consider I am using a standalone Java code and I know the location and the file name.

Roy

Former Member
0 Kudos

Roy,

This java code is it a servlet / JSP? or is it a standalone code generating file? Please elaborate on this as accessing defualt printer from Servlet / JSPs would require use of scripts where as accessing it from standalone running code might be different.