code: protected void closeIt() throws IOException {
          for (int k = 0; k < readers.size(); ++k) {
              ((PdfReader)readers.get(k)).removeFields();
          }
          for (int r = 0; r < readers.size(); ++r) {
              PdfReader reader = (PdfReader)readers.get(r);
              for (int page = 1; page <= reader.getNumberOfPages(); ++page) {
                  pageRefs.add(getNewReference(reader.getPageOrigRef(page)));
                  pageDics.add(reader.getPageN(page));
              }
          }
          mergeFields();
          createAcroForms();
          for (int r = 0; r < readers.size(); ++r) {
                  PdfReader reader = (PdfReader)readers.get(r);
                  for (int page = 1; page <= reader.getNumberOfPages(); ++page) {
                      PdfDictionary dic = reader.getPageN(page);
                      PdfIndirectReference pageRef = getNewReference(reader.getPageOrigRef(page));
                      PdfIndirectReference parent = root.addPageRef(pageRef);
                      dic.put(PdfName.PARENT, parent);
                      propagate(dic, pageRef, false);
                  }
          }
          for (Iterator it = readers2intrefs.entrySet().iterator(); it.hasNext();) {
              Map.Entry entry = (Map.Entry) it.next();
              PdfReader reader = (PdfReader) entry.getKey();
              try {
                  file = reader.getSafeFile();
                  file.reOpen();
                  IntHashtable t = (IntHashtable) entry.getValue();
                  int keys[] = t.toOrderedKeys();
                  for (int k = 0; k < keys.length; ++k) {
                      PRIndirectReference ref = new PRIndirectReference(reader, keys[k]);
                      addToBody(PdfReader.getPdfObjectRelease(ref), t.get(keys[k]));
                  }
              }
              finally {
                  try {
                      file.close();
                      reader.close();
                  }
                  catch (Exception e) {
                      // empty on purpose
                  }
              }
          }
          pdf.close();
      }
docs: Creates the new PDF by merging the fields and forms.