Solved

Printing in a Java applet

Posted on 1998-04-06
4
488 Views
Last Modified: 2008-02-01
I am trying to write a Java applet that can print. It is easy enough to disable print security in Microsoft Internet Explorer. However, I cannot seem to find a way to do this in Netscape Navigator 4.04. Can anyone help me with this problem?
0
Comment
Question by:chieh061297
[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
  • 2
4 Comments
 
LVL 1

Expert Comment

by:datadesign
ID: 1233948
when using jdk 1.02 simply generate a html file and open this in a new browser window, then u can print from the browser....( u can also print directly from jdk 1.02 , but then u need to know which system u r using (e.g sending a dos string to print a file) but u will have many problöems with the layout etc.
using jdk 1.1, u can use the print functionality.
0
 

Author Comment

by:chieh061297
ID: 1233949
Thank you for help. Unfortunately, I did not phrase the question correctly. We are currently implementing the applet in Java 1.1 because of its print capability. We need to use Java 1.1 because our applet must be cross-platform capable. Plus it is a graphics applet, so we have to print graphics rather than text. The applet renders a vector graphics file in real-time. We would appreciate any help you can provide. We have also increased the points on this question, since it seems harder than we first thought.

0
 
LVL 5

Accepted Solution

by:
fontaine earned 100 total points
ID: 1233950
In order to be able to print from an applet, it has to be signed. Here is some doc. about the security model used in Java 1.1:

http://www.javasoft.com/products/jdk/1.2/docs/guide/security/spec/security-spec.doc1.html#18314

Here is a page at the Netscape site intended for Java developers who are writing applets or libraries that need access to local system resources:

http://developer.netscape.com:80/docs/manuals/signedobj/capabilities/index.html

That's for the theory. The following page explains you  how to sign with an example:

http://java.sun.com/security/usingJavakey.html

If you want some sample code for printing from an applet, you can read at the end of this page:

http://developer.javasoft.com/developer/techDocs/SearchData/dd/newbie/59.html

The discussion should also interest you. Be sure to have full JDK 1.1 support before beginning:

http://developer.netscape.com/software/jdk/download.html
0
 

Author Comment

by:chieh061297
ID: 1233951
That's what we were afraid of. Signed certificate must be obtained from a third party. And for our project, we need to generate it ourself. We were hoping there is an easy way of turning off the security feature in Netscape Navigator like in Internet Explorer. I guess now the question is how do we sign our own certificates? I'll ask that in another thread.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
web application structure 18 114
how to install java on RHEL image on EC2 4 57
Java Restore security prompts not working 10 135
junit example issue 2 27
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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

733 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