@Taher_Khalil, right now, the unique way that you can do the print format, is following the standards for XML ESC/POS
One important fact is, thermal printers, aren’t like normal printers, it don’t cover all capabilities that do you want, and the ESC/POS is a bit limited, each model and each vendor, define they on support for ESCPOS
as reference for wikipedia:
ESC/P derives its name from the start of the escape sequences used, which start with the escape character ESC (ASCII code 27). As an example, ESC E will switch to printing in bold font, while ESC F switches off bold printing. The ESC/P control codes are sometimes also referred to as Epson LQ codes, as they were made popular by the Epson LQ series of dot matrix printers, even though ESC/P was introduced long before LQ printers.
There are several variants of ESC/P, as not all printers implement all commands.
ESC/P J84 adds special support for Japanese computers.
ESC/P2 is a more recent variant of ESC/P by Epson. ESC/P2 is backward compatible with ESC/P, but adds commands for new printer features such as scalable fonts and enhanced graphics printing.
ESC/P-R is a variant now used by Epson on many inkjet printers.
ESC/POS is a variant for controlling receipt printers as commonly used at the point of sale (POS)
So, don’t expect that your termal printer will follow the same printer quality that you have in the normal printers, beause it wont will.
XML-ESCPos ensure that the minimal commands are provided pro printer something in a thermal device