srehanuddin / Cordova-Plugin-Bluetooth-Printer

A cordova plugin for bluetooth printer for android platform
103 stars 116 forks source link

Epson lx-350 invoice print #60

Open eyaso opened 6 years ago

eyaso commented 6 years ago

Hi everyone,

I want to print an invoice but it seems my brain stops already. I create a template by using FastReport and I can export different file types like txt, rtf, png, pdf, HTML etc.. When I export as a png, I can not print. I check base64 string of png and it is correct but my printer does not recognize it. This printer only print different chars and do next page all the time. I fork this plugin and I use your commented base64 string. It doesn't work also.

I try to export as an HTML and I use html2canvas js for converting it to canvas for base64 string. This string also correct but my printer not working with this string.

When I try to export as a txt file, all alignments are gone and this invoice is not the correct format.

I think rtf can be used but I don't know how I use it.

My Design on FastReport capture3

Exported PDF capture

Exported TXT capture2

My exportable formats: BIFF8, Csv, Dbf, Email, Html, Image, Json, LaTex, Mht, Odf, OoXML, Pdf, Ppml, Ps, RichText, SVG, Text, XAML, XML, Zpl

I want to print my invoice as an image but it not working on epson lx350 (it has Bluetooth). I guess that base64 have an error so I override your plugin. I pass directly byte array to printImage function but it doesn't work also. I try lots of ways but I have no solution. I wonder that this kind of printers can print rtf or not.

I need an advice or solution on my issues. Please help me :(