Automatically print via windows using the print command that gets sent to the opening program. So, hence I want to open it but the send print to the program that opened it. I know there is a way to do this with a shortcut, but I was back in win 95 and I can't seem to get it to do it again.
Eric D. Lemle Senior Programmer / Analyst Intermountain Health Care 36 South State Street, Suite 1100 Salt Lake City, Utah 84111 United States of America (USA) (801) 442-3688 -- e-mail: [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 2/22/2005 2:35:30 PM >>> Do you mean you want the file to automatically print, or display the print dialog? If so, I don't believe that's possible. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com Eric Lemle wrote: > When downloading a file how do you get the users (client) computer to > use the > print command/option instead of the open command/option. > > > (Maybe the the same way you get a desktop shortcut to print instead of > open when its double clicked on.) > > > relevant code... > > > private void downloadFile(String attachmentId, HttpServletResponse > response) { > > Attachment attachment=Attachment.retrieve(attachmentId); > try{ > BufferedOutputStream bos=new > BufferedOutputStream(response.getOutputStream()); > response.setContentType(attachment.getMime_type_txt()); > response.addHeader("Content-Disposition", "attachment; > filename="+attachment.getFile_nm()); //maybe something here > bos.flush(); > bos.write(attachment.getFile_contents_bin()); > bos.close(); > } > catch(Exception e) { e.printStackTrace(); } > > } > > > > > Eric D. Lemle > Senior Programmer / Analyst > Intermountain Health Care > 36 South State Street, Suite 1100 > Salt Lake City, Utah 84111 > United States of America (USA) > (801) 442-3688 -- e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]