473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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

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

Oct 21 '06 #1
2 1070
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

--
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor
"aze" <co*****@parkesconsultancy.co.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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

Oct 21 '06 #2
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

Chris Taylor wrote:
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

--
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor
"aze" <co*****@parkesconsultancy.co.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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
Oct 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
21
by: Ian Sedwell | last post by:
Hi guys I am impressed by the level of technical expertise demonstrated by many of the individuals who take time out to answer questions posed by their less-knowledgeable colleagues. Most...
11
by: Steve Jorgensen | last post by:
Now, I don't mean that it's stupid in general. I'm actually pretty impressed with the whole MS Networking thing, but there's one stupid thing that keeps getting in my way, and I can't believe no...
2
by: Lampa Dario | last post by:
Hi, where is this stupid error in this program? When I execute it, i receive a segmentation fault error. #include <stdio.h> int main(int argc, char *argv, char *env) { int i=0; int l=0; int...
3
by: Catweasel | last post by:
I'm new to C++ and have been chucked in at the deep-end. I have a C++ console app that works fine. All I want to do is write to file however as soon as I include the fstream library and try to...
4
by: Jerry | last post by:
I've inherited a system w/5 projects - I'll refer to them as P1 thru P5 - P5 being the executable... P1 has no dependents. P2 is dependant upon P1 P3 has no dependents. P4 is dependant upon P1,...
15
by: sparks | last post by:
We get more and more data done in excel and then they want it imported into access. The data is just stupid....values of 1 to 5 we get a lot of 0's ok that alright but 1-jan ? we get colums...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.