Exporting Java Applet to Graphic Format

Discussion in 'Java' started by Will Carty, Aug 14, 2003.

  1. Will Carty

    Will Carty Guest

    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.
     
    Will Carty, Aug 14, 2003
    #1
    1. Advertising

  2. Will Carty

    Neomorph Guest

    On 14 Aug 2003 13:45:05 -0700, (Will Carty) two-finger
    typed:

    >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.
     
    Neomorph, Aug 15, 2003
    #2
    1. Advertising

  3. Will Carty

    Will Carty Guest

    Neomorph <> wrote in message news:<>...
    > On 14 Aug 2003 13:45:05 -0700, (Will Carty)
    > two-finger
    > typed:
    >
    > >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.


    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.
     
    Will Carty, Aug 16, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=

    html table to png, or other graphic format

    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=, Feb 15, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    388
    =?Utf-8?B?S3VydCBTY2hyb2VkZXI=?=
    Feb 15, 2005
  2. Georg Andersson

    looking for graphic editor applet

    Georg Andersson, May 17, 2004, in forum: Java
    Replies:
    1
    Views:
    420
    Andrew Thompson
    May 17, 2004
  3. Krista
    Replies:
    3
    Views:
    2,365
    Andrew Thompson
    Sep 15, 2004
  4. Mel
    Replies:
    24
    Views:
    987
    Toby Inkster
    Jun 15, 2005
  5. 50 SOMETHING GAL
    Replies:
    3
    Views:
    424
Loading...

Share This Page