473,387 Members | 1,882 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,387 software developers and data experts.

Print From Webservice

I've seen many posts asking how to print from a webservice. However, I've never seen a clear example / how-to or even set of instructions on how to do it. Has anyone seen something like this? I am trying to create a webservice that prints rtf documents (would only be used on a LAN, it obviously wouldn't be available over the internet). I'm trying to do this in C#. Is this possible? Are there any resources that any of you know about to accomplish this task?
Oct 28 '08 #1
5 1879
Plater
7,872 Expert 4TB
Have you looked at the PrintDocument class?
Also, I *think* if the RTF filetype is registered with the system (like you can right click on it and say "print" ) you can do something with the Process class, to just have it print using the program configured to normally handle RTF documents.
Oct 29 '08 #2
Have you looked at the PrintDocument class?
Also, I *think* if the RTF filetype is registered with the system (like you can right click on it and say "print" ) you can do something with the Process class, to just have it print using the program configured to normally handle RTF documents.
I agree that the Process class should be helpful, but I don't think it works without a User Profile. When the Process command executes from the webservice will there be a default printer? When it executes will the system know that there is a program configured to handle rtf documents?
Oct 29 '08 #3
Plater
7,872 Expert 4TB
I agree that the Process class should be helpful, but I don't think it works without a User Profile. When the Process command executes from the webservice will there be a default printer? When it executes will the system know that there is a program configured to handle rtf documents?
Good point, did not even think of that. I suppose that is the reason you do not have access to the printers ?
Oct 29 '08 #4
Good point, did not even think of that. I suppose that is the reason you do not have access to the printers ?
That is my only guess. I've setup impersonation: I know that I have sufficient security. I've checked that the printer is installed (I created a log file and printed out the list of all installed printers). I even have gone so far as to allow anon-users to print on the printer. I've verified that my code works when it is NOT in a webservice and it seems to work just fine. Nothing... I always get an error stating that "Settings to access printer 'printer name' are not valid"
Oct 29 '08 #5
Plater
7,872 Expert 4TB
Is there anywhere in the code that that you rely on like "default" settings(whether you know it or not?)? Maybe they just don't exist and that is the problem?
Oct 29 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: DraguVaso | last post by:
Hi, I'm new to WebServices, and I'm doing some tests (with a small VB.NET-application) to know the performance-difference between a WebService and the 'normal'-way of getting data (just...
6
by: Davie | last post by:
I want to authorise a user of a web service by using the AuthHeaderValue for some reason I keep getting a null reference exception when I try to run the following code: It seems to work fine on a...
1
by: Nalaka | last post by:
Hi, I am testing with Visual studio 2005, web projects. Situation: I have one solution with two web projects, created as file system projects. (I am tesing using the built in server, not IIS)...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
7
by: Alessandro Benedetti | last post by:
Hi. I'm calling two methods of a .NET Webservice (A) from another Webservice (B). The A Webservice is made like this: public class WSA: System.Web.Services.WebService { private int X = 0;
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
5
by: | last post by:
Hi, How long do webservice objects live for? In particular, if i have static variables filled with data from a static constructor in a webservice, how long will that data persist? thxs
0
by: =?Utf-8?B?TWFuaQ==?= | last post by:
Hi All, Problem in deploying my WebService developed using Asp.net WebServices 2005. I have designed simple WebService using Asp.net Webservices 2.0 , The webservice look this , using System;...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.