Solved

printing from VRML frame

Posted on 1998-04-07
10
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1858204
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
ID: 1858205
Yes - I mean clicking on part of the world itself, in order to print the VRML frame.
0
 
LVL 1

Author Comment

by:garyennis
ID: 1858206
Yes - I mean clicking on part of the world itself, in order to print the VRML frame.
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 
LVL 5

Expert Comment

by:julio011597
ID: 1858207
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
ID: 1858208
Perhaps this -

<a href="dummy" onclick="document.print()">Link</a>
0
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1858209
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
ID: 1858210
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
ID: 1858211
Forgot to ask - any workaround for Netscape Navigator 3???
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1858212
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
ID: 1858213
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

623 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