Solved

printing from VRML frame

Posted on 1998-04-07
10
240 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error in Angular 2 when showing in grid 4 66
Tracking uptime for a bunch of sites 3 117
migrating to phpbb forum from vBulletin 4.2 3 94
Programming Language for Wordpress 7 87
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

732 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