title: Printing from Phone to Hp Printer via Wifi
body: <p>I have saved My ListView items as a Pdf file in local Storage,but not able to print the Pdf file and also can't open it.<br>
  It shows the error like this  :  "Cannot display pdf (myfile.pdf is in Invalid format)"<br></p>
  
  <pre><code>File fileDir = new File(
                  Environment.getExternalStorageDirectory(),
                  "Android/data/mypackage/");   
  
          if (!fileDir.exists())
              fileDir.mkdirs();
  
  
          File newFile = new File(fileDir, fileName+ ".pdf");
  
          BufferedWriter bw = new BufferedWriter(new FileWriter(newFile, false));
  
      /*
       * Write a header row.
       */
          bw.write("Description" + "\t\t\t" + "Value");
  
      /*
       * and a row for each result, comma separated
       */
          for (int i = 0; i &lt; jewelleryDetailsList.size(); i++) {
              String row = new String();
              row = jewelleryDetailsList.get(i).getLine1()
                      + "\t\t" + jewelleryDetailsList.get(i).getLine2();
              bw.write(row);
          }
  
          bw.close();
  </code></pre>