void closeFile() throws IOException {

    if (pdf_datafile != null) {
      pdf_datafile.close();
      pdf_datafile = null;
    }
  }