Solved

printing from VRML frame

Posted on 1998-04-07
10
217 Views
Last Modified: 2013-12-25
I have a kiosk application based around a VRML model (running cosmoplayer2 in win95) - this means that
the user does not have access to the print command under the file menu.

Is it possible to set up some sort of HTML/Javascript/Java/Vrml
functionality that allows me to print the VRML frame without accessing
the menu bar??

Preferably, I would like to be able to print from a defined button in
the HUD, but any suggestions would be considered.
0
Comment
Question by:garyennis
  • 5
  • 5
10 Comments
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
Do you mean, clicking - say - an Anchor inside the world to print... what? the html page, or the VRML itself?
0
 
LVL 1

Author Comment

by:garyennis
Comment Utility
Yes - I mean clicking on part of the world itself, in order to print the VRML frame.
0
 
LVL 1

Author Comment

by:garyennis
Comment Utility
Yes - I mean clicking on part of the world itself, in order to print the VRML frame.
0
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
Ok, if you can find the javascript code to print, i can tell you how to use it from the VRML world.
0
 
LVL 1

Author Comment

by:garyennis
Comment Utility
Perhaps this -

<a href="dummy" onclick="document.print()">Link</a>
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
Comment Utility
Ok, in the meantime i've found it, too; it is:

window.print();

i.e. print() is a method of the window object.

Also, please note that it has been implemented in NN4.x, that is it won't work on older browsers; but this shouldn't be a problem for a kiosk application, since you can install the needed browser, i guess.

Now the VRML code:

Anchor {
  ...
  url "javascript:void(self.print())"
}

That's all.

BTW, the same functionality attached to other types of  events - e.g. to Sensors - is quite more tricky, since needs EAI.

-julio

P.S. please, a dumb request: would you mind explaining what HUD stands for? TIA.
0
 
LVL 1

Author Comment

by:garyennis
Comment Utility
Cheers Julio....

Havnt tried it out yet - need to install NN4 but sure it'll work fine.

HUD means Head Up Display (meaning geometry that stays in the viewport at all times - like what a pilot sees through his visor!).

Cheers!!
0
 
LVL 1

Author Comment

by:garyennis
Comment Utility
Forgot to ask - any workaround for Netscape Navigator 3???
0
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
No, i'm afraid there's no workaround; in fact, that scheme (calling Javascript from an Anchor) workes on any browser supporting Javascript, but it is the print() method itself that has been implemented in NN4; no ways to print in previous versions.

BTW, thanks for your explanation :)

Bye, julio
0
 
LVL 5

Expert Comment

by:julio011597
Comment Utility
Huh, forgot to tell; to get rid of the browser version problem, you could investigate wether a Java applet is allowed to print; in that case you could still avoid EAI by having your Anchor call a JS function (as i've shown) and that JS function call a Java function to print (LiveConnect is much more simple and reliable than EAI).
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now