Ionic bluetooth serial write html content

Hi,

I am trying to print some content in my app into a thermal printer. When i print a normal text , it works perfectly. But i want is a formatted data. I am trying to print a product bill. So i tried adding HTML table , but it does not print the table , instead it prints the html code as it is.

Any idea on how to solve this ??

Find below sample of the code which i tried

      printData += "<table><tr><th>No</th> <th>Item</th> <th>Price</th></tr></table>";
      printData += "<tr><td>1</td> <td>Dhoti Lungi Pagiti big name</td> <td>150</td></tr>";
      printData += "<tr><td>1</td> <td>Dhoti </td> <td>250</td></tr>";
      printData += "</table>";
      printData += "\n\n\n";

     let xyz=this.connectBT(address).subscribe(data=>{
      this.btSerial.write(printData).then(dataz=>{
        console.log("WRITE SUCCESS",dataz);

        let mno=this.alertCtrl.create({
          title:"Print SUCCESS!",
          buttons:['Dismiss']
        });
        mno.present();

        xyz.unsubscribe();
      },errx=>{
        console.log("WRITE FAILED",errx);
        let mno=this.alertCtrl.create({
          title:"ERROR "+errx,
          buttons:['Dismiss']
        });
        mno.present();
      });
      },err=>{
        console.log("CONNECTION ERROR",err);
        let mno=this.alertCtrl.create({
          title:"ERROR "+err,
          buttons:['Dismiss']
        });
        mno.present();
      });


Hi,
¿Do you have any solution?

No still searching for a solution. Found out that the printer i bought only supports unicode

Hi,

I have been looking for the same solution, did u get that. if you have that solution, please share with me.

Thanks in Advance.

I didnt get a solution to print HTML content , instead i had to write in ESC/POS

hi did you find the solution ??