code: public void close() {
          if (open) {
              PdfReaderInstance ri = currentPdfReaderInstance;
              pdf.close();
              super.close();
              if (ri != null) {
                  try {
                      ri.getReader().close();
                      ri.getReaderFile().close();
                  }
                  catch (IOException ioe) {
                      // empty on purpose
                  }
              }
          }
      }
docs: Signals that the <CODE>Document</CODE> was closed and that no other
  <CODE>Elements</CODE> will be added.
  <P>
  The pages-tree is built and written to the outputstream.
  A Catalog is constructed, as well as an Info-object,
  the reference table is composed and everything is written
  to the outputstream embedded in a Trailer.