• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help optimizing this image printing applet

 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The guy who originally set up this applet left a couple of years ago, but it has always worked fine for us. The only problem is that some users don't like the speed (or lack thereof). I realize that there may be no way to give it much of a boost--to me, the code looks pretty simple and straightforward.

The point of the applet is to download to the user's browser a packing label image from the server and print it on the web app user's local thermal label printer. These thermal labels are typically connected on a parallel or USB port (we tell people on COM/serial ports that it's not supported, but the reason we say this is because it's usually much too slow for most users' patience). The thermal labels are about 4 x 6 inches, and the applet is necessary because if the images were just displayed in the browser they wouldn't be situated correctly on the label (we've tried it). I've included the relevant applet code below, and as you can see, we also use another little class to handle the image because it's base 64 encoded, but I think the code I'm showing and the comments should be sufficient to understand what's going on (really, not much at all). We're thinking there's no way to really speed this up, but if anything jumps out at you, please let us know:


[ February 18, 2005: Message edited by: Stephen Huey ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic