Printing From Server ASP.NET

  • Thread starter Thread starter ryanp
  • Start date Start date
R

ryanp

Printing From Server ASP.NET

Anyone have a good solution for easily printing files of different
types programmically... for example word documents, photoshop psd
files, jpeg's, xls documents, etc...


Is it possible to do this easily?
 
It's not... sexy... but many application support instant printing via a /p
command line param or via OLE automation. I'd generally avoid this on a
server but if it's an internal app with very low yield, it could do the
trick.
 
Thanks for the reply. I think I should go a little more in detail about
my problem. I have a .html file and I would like to print it without
using the print dialog box.(i.e. double click on filepath and print
straight to printer) Here is my code thus far:(in vb.net)

Dim p As New Process
Dim FilePath as string

p.StartInfo.FileName = FilePath
p.StartInfo.Verb = "print"
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
p.StartInfo.UseShellExecute = True
p.Start()

This Almost does the trick. The problem is that it keeps prompting me
with the print dialog box. Is there a way around this? Maybe I don't
have a property on my machine set correctly? It is probably a simple
solution, any suggestions or insight will be very much appreciated.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top