In article <1184754255.669017.155400@[EMAIL PROTECTED]
>,
sivashanmugam.m@[EMAIL PROTECTED]
wrote:
> Hello All,
>
> Is there anyway by which we can access the local printer to do custom
> printing from Mac/Safari-rendered web page? Basically, I should be
> able to access a web server for data and print them in a custom way
> (like labels, banners, etc) on the locally attached printer from the
> web page on Safari browser.
>
> Microsoft/IE allows this via ActiveX component embedding and
> scripting. Does Mac/Safari have an equivalent?
>
> Thanks for your response.
>
> -Siva
You are posting in <news:codewarrior.mac> , a newsgroup about a brand of
Mac C/C++ compiler that hasn't been sold for years. Consider posting to
<news:comp.sys.mac.programmer.help>
The answer to your question is: No.
0.) On a general web page, you can't embed a piece of machine language,
which, when downloaded, will do arbitrary things to the user's Mac. It
would be a security hole.
1.) However, it is surprisingly simple to use XCode and InterfaceBuilder
to make a Cocoa program, with a window containing a Webkit view, and
provide that view with some custom javascript functions, which call
through to C code in your app, and from there, your app can do anything
it wants. You can ask your users to download and run your app, which in
turn accesses your site.
http://developer.apple.com/do***entation/Cocoa/Conceptual/DisplayWebConte
nt/
2.) Dashboard widgets also allow you to package a library of
C/C++/Objective-C functions to be called from the HTML+Javascript of the
widget.
http://developer.apple.com/macosx/dashboard.html


|