Sort of / kind of, but it depends on the document types and the browser and
exactly how you want this all to work.
If you're printing HTML or Text documents (both of which most web browsers
can print), you'd do this by creating your own HTML pop-up "print preview"
window with a frameset, a toolbar (with your print, close buttons). The
body of the frameset would actually display the document. Print would
invoke some Js indicating (I believe) which frame you want printed, and
you're good.
If you documents are not HTML or text than they're probably not browser
printable or viewable. You'll need a separate application that can open,
read, display, print the file. Acrobat, Excel, Word, PowerPoint all work in
this manner. Many of these have an embedded viewer that will open in your
browser, which is kind of neat but In many (all?) cases it means your
javascript print button won't work. Instead you'll have to print directly
from the vewer. Acrobat is a perfect example of this; all functions (print,
save, copy) relating to the document must be done using the acrobat toolbar,
not the browser toolbar.
I'm not aware of any way to avoid downloading a document before printing it;
you have to get it to the client system somehow in order to get it to the
client's printer. Though, someday soon, we might see the ability to print a
Url, which tells the printer to go get the document. Why not, eh?
With the HTML and text documents, you could probably download the document
to a hidden 0-pixel-wide frame so the user doesn't see it, if that's what
your asking. The javascript to print should still work in that case.
Anything fancier, you're probably stuck with ActiveX controls or a lot of
user documentation to explain what do do with different document types.
/// M
"ACaunter" <Ad****@hotmail.com> wrote in message
news:FC**********************************@microsof t.com...
Hi all,
i was wondering if there was a way to directly print a document to the
user's printer, without having to download it first...
I needed something like a button, and when the user clicks the button, a
print preview window , or adobe, whatever.. will open up and allow the
user to see what the document looks like, then have the open to close it or
print it...
is that possible??
--
Ad****@hotmail.com