title: How to Convert HTML to String android and print that string
body: <p>I followed <a href="https://download.epson-biz.com/modules/pos/index.php?page=single_soft&amp;cid=4601&amp;scat=50&amp;pcat=52" rel="nofollow noreferrer">this</a>/<a href="https://download.epson-biz.com/modules/pos/index.php?page=single_soft&amp;cid=4747&amp;scat=61&amp;pcat=52" rel="nofollow noreferrer">this</a> to Print Receipts in part of POS(Point of Sale) from EPSON Printer</p>
  
  <p>Here I am getting data Json from URL (inside the Json Object I am getting a html print template):</p>
  
  <pre><code>{
      "response": {
          "status": "&lt;table&gt;.... &lt;/table&gt;"
      }
  }
  </code></pre>
  
  <p>so with intent I used the above json response to a string and converted it to html:</p>
  
  <pre><code>method = "addFeedLine";
  mPrinter.addFeedLine(1);
  
  textData.append("Test print Sample string\n");**//this is sample text**
  
  textData.append(Html.fromHtml(status + "\n"));
  **//this is JSON response which is nothing but HTML code, so I am converting it to string**
  </code></pre>
  
  <p>Over there I have used <code>status</code> as a string so that whatever the content is inside that string, it is printed.</p>
  
  <p>If it's is not a html but just a plain text I will print it like this</p>
  
  <pre><code>method = "addFeedLine";
  mPrinter.addFeedLine(1);
  textData.append(status);
  </code></pre>
  
  <p>Here is an example of what <code>status</code> looks like</p>
  
  <pre><code>"status": "The store list Sample\nSTORE DIRECTOR – XYZ\n01/01/01 16:58 6153 05 0191 134\nST# 21 OP# 001 TE# 01 TR# 747\n------------------------------\n400 OHEIDA 3PK SPRINGF 9.99 R\n410 3 CUP BLK TEAPOT 9.99 R\n445 EMERIL GRIDDLE/PAN 17.99 R\n438 CANDYMAKER ASSORT 4.99 R\n474 TRIPOD 8.99 R\n433 BLK LOGO PRNTED ZO 7.99 R\n458 AQUA MICROTERRY SC 6.99 R\n493 30 L BLK FF DRESS 16.99 R\n407 LEVITATING DESKTOP 7.99 R\n441 ** Blue Overprint P 2.99 R\n476 REPOSE 4 PCPM CHOC 5.49 R\n461 WESTGATE BLACK 25 59.99 R\n------------------------------\nSUBTOTAL 160.38\nTAX 14.43\nTOTAL 174.81\nCASH 200.00\nCHANGE 25.19\n------------------------------\nPurchased item total number\nSign Up and Save!\nWith Preferred Saving Card\n"
  </code></pre>
  
  <p>Now, here I have a plain HTML page: </p>
  
  <pre><code>Search Images Maps Play YouTube News Gmail Drive More »
  Web History | Settings | Sign in
  
                    Louisa May Alcott’s 184th birthday
  
         [                                                         ] Advanced
                                                                     searchLanguage
                     [Google Search][I'm Feeling Lucky]              tools
  
   Advertising ProgrammesBusiness Solutions+GoogleAbout GoogleGoogle.com
  
                         © 2016 - Privacy - Terms
  </code></pre>
  
  <p>I need to print this from an url.</p>
  
  <p>Can anyone suggest me how to print this plain text?
  There is no HTML tags and no JSON data.</p>