title: Printing a PDF enters a long and slow flattening process
body: <p>I am programmatically trying to create an pdf by superimposing two pdf files using itextpdf. The PDF that was made goes into this flattening process for some reason, how do I skip flattening or make the process faster.</p>
  
  <pre><code>PdfReader reader = new PdfReader(template);
  PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
  
  PdfReader r;
  PdfImportedPage page;
  int i=1;
  for (String path : patterns) {
      r = new PdfReader(path);
      for(int j=1;j&lt;=r.getNumberOfPages();j++) {
          page = stamper.getImportedPage(r, j);
          PdfContentByte canvas = stamper.getUnderContent(i++);
          canvas.addTemplate(page, 0, 0);
          stamper.getWriter().freeReader(r);
      }
      r.close();
  }
  stamper.close();
  </code></pre>