title: How To Create a PDF file in raw in Android
body: <p>How to Create A PDF fiel in raw ..Eventhough I Was using iText.jar I was geting an error specifying File Not Found Error and also saying File cannot be Opened .Here is the code</p>
  
  <p>/** Called when the activity is first created. */</p>
  
  <pre><code>EditText editText;
  Button button;
  private static String FILE = "C:/FirstPdf.pdf";
  String body ;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      editText = (EditText)findViewById(R.id.editText1);
      button = (Button) findViewById(R.id.button1);
      button.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              body = editText.getText().toString();
  
              Document document = new Document();
              try {
                  PdfWriter.getInstance(document, new FileOutputStream(FILE));
                  document.open();
                  document.addSubject(body);
                  document.close();
              } catch (Exception e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } 
          }
      });
  
  }
  </code></pre>