title: How can I open a pdf after I create that with iText?
body: <p>I created a pdf with iText and I want to open it, but when I do that Adobe Reader says me "Error opening document. This file is already open or is used by another application".
  How can I resolve?</p>
  
  <p>This is my code (sorry for the Houston println exception ;)): </p>
  
  <pre><code>try {
              Document document = new Document();
              PdfWriter writer = PdfWriter.getInstance(document,new FileOutputStream("c:/Users/Gabriel/Desktop/"+txtName.getText().toString()+".pdf"));
              PdfReader reader = new PdfReader("src/file.pdf");
              PdfStamper stamper =  new PdfStamper(reader, new FileOutputStream("c:/Users/Gabriel/Desktop/"+txtName.getText().toString()+".pdf"));
              AcroFields form = stamper.getAcroFields();
              ..code..
              stamper.close();
              //document.close();
              Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "c:/Users/Gabriel/Desktop/"+txtName.getText().toString()+".pdf");
                  }catch (Exception exc) {
                      System.out.println("Houston we got a problem! : "+exc);
                  }
              }                    
  </code></pre>