title: display pdf in browser using itext
body: <p>i have modify a pdf with itext using pdfstamper. my application now create and save a new pdf file. i want to dipslay the pdf directly in the browser. Here my actual code</p>
  
  <pre><code>public static void test07(){
      try{
      PdfReader reader = new PdfReader("c:\\temp\\file.pdf");
          PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("c:\\temp\\new.pdf"));
          AcroFields form = stamper.getAcroFields();
  
          //fill the fields
  
          stamper.close();
          reader.close();
      } catch (Exception e){
          e.printStackTrace();
      }
  </code></pre>
  
  <p>}</p>
  
  <p>The question is: How should I modify this code and the servlet to display the pdf file in the browser?
  I have already tried with ByteArrayOutputStream and response.getOutputStream but nothing.</p>