Am i being stupid?? (its been know to happen)

A

aze

Hi,
I am trying to print a word document (serverside) using the
system.drawing.printing.Printdocument class. I can get this to work,
but how do I get it to print the document I want printed?? I can't
seem to find a way of passing any information to this method? Am I
missing something?
Thanks
 
C

Chris Taylor

Hi,

The PrintDocument class is used to manage programatic printing, so your
printing is done by drawing to the graphics object in response the the
PrintPage event of this class. If you want to print word documents, one
option might be to use Process.Start and set the Verb of the
ProcessStartInfo to "Print", honestly I have not tried this myself and not
even sure this is a good idea esp. from a web application, but I thought it
would be something to investigate.

Hope this helps
 
A

aze

Hi Chris,

Thanks for your response. I have tried that as well, but it fails with
failed to find file. I have run in debug and got the filepath that I'm
passing and clicked start --> run and pasted the filepath info and the
document is opened, so definitely is there? Any ideas why this might
be happening

I have also tried the rawPrinterHelper class supplied by MSDN which
sends something to the printer, but don't know what, the printer starts
then spits out a blank page. In events its captured as a successfult
print of 0 pages.

Any other ideas for me - tearing my hair out at this one!!
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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top