Exporting Java Applet to Graphic Format

W

Will Carty

Hello,

Does anyone know of a library that will export a java applet to a
graphics format, such as png or jpeg?

I am using an open source GIS mapping application which currently
lacks a suitable print feature (www.alov.org). I am not a java
person, but as I understand it there are some inherent problems in
making an applet talk to hardware such as printers (security issues).
I thought perhaps a solution would be to export the map drawn by the
applet to a graphics format, have the graphic displayed in a pop-up
window so that the user could print the map.

Does anyone know of such a utility?

Thanks.

Reply to group only please.
 
N

Neomorph

Hello,

Does anyone know of a library that will export a java applet to a
graphics format, such as png or jpeg?

I am using an open source GIS mapping application which currently
lacks a suitable print feature (www.alov.org). I am not a java
person, but as I understand it there are some inherent problems in
making an applet talk to hardware such as printers (security issues).
I thought perhaps a solution would be to export the map drawn by the
applet to a graphics format, have the graphic displayed in a pop-up
window so that the user could print the map.

Does anyone know of such a utility?

Thanks.

Reply to group only please.

Under Windows the user can always use Alt-PrintScrn to put the current
(browser or pop-up) window into the clipboard and use Paint to paste and
print it.

What problem do you have with using the regular java printing capabilities?
If your window is double buffered (with a BufferedImage), you can simply
paint the image into the graphics context of the PrintJob.

Cheers.
 
W

Will Carty

Neomorph said:
Under Windows the user can always use Alt-PrintScrn to put the current
(browser or pop-up) window into the clipboard and use Paint to paste and
print it.

Thanks for the reply.

Perhaps your users are a little more savvy than mine, but telling them
to use alt-print screen, paste to paint and print seems a tad too
convoluted for John Q. Public :)

We are using an open source web-based mapping application. The
application draws maps (obviously) based on geo-spatial data. Users
may need to be able to print the map so that they can use it for
whatever purposes they see fit (eg, where are the land boundaries,
roads, water / sewer, etc etc). Currently, they print the map using
the built-in browser print function. This works, however, they end up
printing everything else on the page along with the applet. The
downside to this is that the map becomes rather small and isn't very
useful to them. A map which uses the entire printed page would be far
more useful to the average visitor to this site.

One way around this, yes, would be to put the applet in it's own frame
& just print that frame using javascript. I would rather avoid frames,
so it would be nice to know if there were any way to export the applet
to a graphics format so that it could be presented in a new window -
if the user wanted to print the map.

There is no other reason for converting to a graphics format. No one
needs to download or manipulate the graphic - it simply seems to me
that it would be easier to take a "snapshop" of the current map view,
export to a graphic format & print that as opposed to trying to
re-draw the exact map view again via the applet in another window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top