Solved

printing from VRML frame

Posted on 1998-04-07
10
233 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
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.

830 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