I am interesting in allowing the user to select some information from a web
form ... and then based on that input perform was database queries and then
print a job to a windows queue. I 'googled' on many topics to determine how
best to perform the print portion of this - but had no luck. I'm
contemplating taking the user's input, query the database and then create
the appropriate xml to send to the queue. The queue is being monitored and
can utilize the xml to print the job appropriately.

If anyone has any pointers towards printing a file to a windows queue from a
web site (server side) I would be most appreciative.

BBB

Re: Print File by mr

mr
Wed Jan 26 16:58:42 CST 2005

hi Billy,

This is the standard answer:

Const OLECMDID_PRINT = 6
Const OLECMDEXECOPT_DONTPROMPTUSER = 2
Const PRINT_DONTBOTHERUSER = 1
Const PRINT_WAITFORCOMPLETION = 2

...

' bring focus to the document so that it will be what prints:
oIE.document.body.focus()

' start printing, and wait until output has been spooled to printer...
oIE.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, _
PRINT_WAITFORCOMPLETION, 0

cheers, jw

"Billy Boone" <b3booner@insightbb.com> wrote in message
news:9MOJd.22044$P04.8169@attbi_s03...
> I am interesting in allowing the user to select some information from a
web
> form ... and then based on that input perform was database queries and
then
> print a job to a windows queue. I 'googled' on many topics to determine
how
> best to perform the print portion of this - but had no luck. I'm
> contemplating taking the user's input, query the database and then create
> the appropriate xml to send to the queue. The queue is being monitored
and
> can utilize the xml to print the job appropriately.
>
> If anyone has any pointers towards printing a file to a windows queue from
a
> web site (server side) I would be most appreciative.
>
> BBB
>
>



oops sorry, that was client side code by mr

mr
Wed Jan 26 17:14:08 CST 2005

but still, you may be able to use it by inserting it into your page
that shows on the client's system, jw

"mr unreliable" <ReplyToNewsgroup@notmail.com> wrote in message
news:e8TgVj$AFHA.3416@TK2MSFTNGP09.phx.gbl...
> hi Billy,
>
> This is the standard answer:



Re: oops sorry, that was client side code by Billy

Billy
Thu Jan 27 05:52:59 CST 2005

Sorry, unfortunately the printing needs to be done server side.

Any pointers you might have that would get me started would be most
appreciated.

BBB

"mr unreliable" <ReplyToNewsgroup@notmail.com> wrote in message
news:%23Y9q7r$AFHA.1392@tk2msftngp13.phx.gbl...
> but still, you may be able to use it by inserting it into your page
> that shows on the client's system, jw
>
> "mr unreliable" <ReplyToNewsgroup@notmail.com> wrote in message
> news:e8TgVj$AFHA.3416@TK2MSFTNGP09.phx.gbl...
> > hi Billy,
> >
> > This is the standard answer:
>
>



Server Side Printing, take 2... by mr

mr
Thu Jan 27 12:12:58 CST 2005

hi Billy,

Try this:

--- <snip> ---
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objWSHNet = CreateObject("WScript.Network")

' Connect to Network Printer from Windows Scripting Host
objWSHNet.AddPrinterConnection "LPT1", strPrinterPath, False, strUsername,
strPassword

' Open Print device as a file using the File System Object
Set objPrinter = objFS.CreateTextFile("LPT1:", True)

' Send text to print device using the File System Object
objPrinter.Write(strMessage)
--- </snip> ---

The code mentioned just above came from this page (nr bottom)

http://www.taltech.com/TALtech_web/support/bcax/ASP_Printing.html

Here is a google enquiry with some more references:

http://www.google.com/search?hl=en&q=asp+printing&btnG=Google+Search

Maybe something there would be of use.

happy hunting, jw

"Billy Boone" <b3booner@insightbb.com> wrote in message
news:vC4Kd.31120$EG1.22489@attbi_s53...
> Sorry, unfortunately the printing needs to be done server side.
>
> Any pointers you might have that would get me started would be most
> appreciated.
>
> BBB



Re: Server Side Printing, take 2... by Billy

Billy
Fri Jan 28 06:17:13 CST 2005

That looks promising. Thanks!

"mr unreliable" <ReplyToNewsgroup@notmail.com> wrote in message
news:%23p2WUoJBFHA.4004@tk2msftngp13.phx.gbl...
> hi Billy,
>
> Try this:
>
> --- <snip> ---
> Set objFS = CreateObject("Scripting.FileSystemObject")
> Set objWSHNet = CreateObject("WScript.Network")
>
> ' Connect to Network Printer from Windows Scripting Host
> objWSHNet.AddPrinterConnection "LPT1", strPrinterPath, False, strUsername,
> strPassword
>
> ' Open Print device as a file using the File System Object
> Set objPrinter = objFS.CreateTextFile("LPT1:", True)
>
> ' Send text to print device using the File System Object
> objPrinter.Write(strMessage)
> --- </snip> ---
>
> The code mentioned just above came from this page (nr bottom)
>
> http://www.taltech.com/TALtech_web/support/bcax/ASP_Printing.html
>
> Here is a google enquiry with some more references:
>
> http://www.google.com/search?hl=en&q=asp+printing&btnG=Google+Search
>
> Maybe something there would be of use.
>
> happy hunting, jw
>
> "Billy Boone" <b3booner@insightbb.com> wrote in message
> news:vC4Kd.31120$EG1.22489@attbi_s53...
> > Sorry, unfortunately the printing needs to be done server side.
> >
> > Any pointers you might have that would get me started would be most
> > appreciated.
> >
> > BBB
>
>