Solved

printing a webpage that contains JApplets

Posted on 2009-03-30
10
297 Views
Last Modified: 2013-12-25
Hey experts,

So i am trying to add a print this page button to a perl CGI script, the CGI prints out HTML code with several applets called.

I need to print all the applets together and they are of type JApplet:

class Graph extends JApplet {

I have spoken to a prof of mine and she seems to think that since the print button is part of the HTML:

<input type="button" value="Print this Page" onclick="window.print()">

and not inside the JApplet then the browser should print it fine but i am finding that firefox does not do the job regardless of OS.

I use a Mac and my safari prints everything fine.

I am thinking that perhaps i am missing a function in my JApplet that the browser may need to call.

Any ideas?

Thank!

- Tristan
0
Comment
Question by:TristanTheHakSoar
  • 5
  • 3
  • 2
10 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 24022939
That code works fine in my version of firefox.  Is javascript enabled?


Try this... do you get a message box saying "testing"

<input type="button" value="testing" onClick="alert('testing')">

Open in new window

0
 
LVL 92

Expert Comment

by:objects
ID: 24023959
last time I checked that was a limitation in ff, ie. applets on the page do not get printed



0
 

Author Comment

by:TristanTheHakSoar
ID: 24035174
Hey guys,

So yeah the alert command works perfectly and i tried searching google for a mention of the inability in firefox and it didn't turn up much accept for some linux Sarge problems where nothing would be sent to the printer.

I have today also spoken with a student who mentioned something about including some kind of compatibility code for firefox in the html.

- Tristan
0
 
LVL 92

Expert Comment

by:objects
ID: 24035226
have you tried printing any other applets from ff?
0
 
LVL 39

Expert Comment

by:Adam314
ID: 24039980
If you select print from the file menu in firefox, does it work?
0
IT, Stop Being Called Into Every Meeting

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!

 

Author Comment

by:TristanTheHakSoar
ID: 24090858
Hey guys, sry but my semester is coming to a close and i'm swamped in homework and studies.

Anyways, i have tried printing other websites such as Addictinggames.com with a game loaded and newgrounds.com just the home page. Neither gets java printed.

Also, no the file > print method does not work either so this seems to be a limitation of firefox as mentioned by objects.

Would anyone have an idea as to what firefox needs in order to make an applet printable?

- Tristan
0
 

Author Comment

by:TristanTheHakSoar
ID: 24196683
Hey all, so my computer's hard disk bit the biscuit but as i am done schooling for the year i now have access to my work's computers full time.
I have already completed rewriting several applets for them but i am still under pressure to get this print button enabled.
I was speaking to a kid at my University who seemed to be on drugs given his blood shot eyes and constant stuttering but he tried to tell me code i could implement to make firefox print the applets followed by a remark that he was smarter than computer scientists.
I have since made it my duty to avoid this individual when i do see him but i am trying to track down the code as we speak with no success.
Anybody have any ideas? this should be really straight forward, making applets printable in firefox.
Thanks,
- Tristan
 
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 24200377
I've never seen ff successfully print any applet

0
 

Author Comment

by:TristanTheHakSoar
ID: 24243826
Hey experts,

So If FF (along with anything other than Safari) is gonna be a waste of disk space, i guess i know what i'm going to do. I'm gonna try this new thing i found where i can use java to create a pdf file and send that to the printer, it'll be a load of work but i have to do it.

Thanks,
-Tristan
0
 

Author Closing Comment

by:TristanTheHakSoar
ID: 31564475
Wow man, i can't believe this, it makes me want to cry lol.

- TristanTheHakSoar
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

10 Experts available now in Live!

Get 1:1 Help Now