Hi Youyi,
I don't know if you'll be able to get a printer name from the port
generically. You can stream it data but in order to get the name I believe
you need to use Escape codes. These codes are what constitutes the printer
driver. The problem is that printers don't use a standard set of escape
codes (if they did we wouldn't need drivers) so in order to get the printer
name you would need to send it the correct escape code for that specific
printer. If you have a standard subset of printers you are working with
then you could find the escape codes for each and then send them all till
you get the name and don't error out (this could back fire if the escape
code to get the name for one actually executes a print for another or worse
changes a setting).
As far as I know I've never come across a way to do what you are doing.
However, maybe research into how Windows does it's Auto-Detect stuff might
lead you down the right path and you would only need to check out the LPT
and Virtual LPT ports (maybe serial too if you are dealing with those). I
would also look into the escape code for the most popular printers you are
dealing with, you might get lucky and the majority of them will use the same
escape code needed...especially if they are mostly different models from the
same vendor. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"notregister" <no*********@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
hi,
i have been trying to send a printer-ready data to an unknown printer to
print. the reason why the printer is unknown is that i do no wish
installed any printer driver. so at the end my printing would have to bypass the
printer driver..
i have read several article on sending file directly to a printer, but i
could not understand how could i get the printername from the
ports(especially when there is no driver install)? Can anyone help me??
regards
youyi