@Override public void close(){
synchronized (this.lock) {
    if (isPreview) {
      pageImages.addElement(previewImage);
      pagenum=1;
      displayPage();
    }
    if (page != null) {
      page.dispose();
    }
    if (job != null) {
      job.end();
    }
  }
}

@ Override public void close ( ) { synchronized ( this . lock ) { if ( isPreview ) { pageImages . addElement ( previewImage ) ; pagenum = 1 ; displayPage ( ) ; } if ( page != null ) { page . dispose ( ) ; } if ( job != null ) { job . end ( ) ; } } }
method modified by dennis miller to add preview capability
