Solved

Printing in a Java applet

Posted on 1998-04-06
4
497 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

689 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