This library offers a Adafruit GFX "driver" for ESP32 and the cheap cat (or rabbit?) BLE thermal printers like this one: For usage information have a look examples folder.
If you are looking for support for different printers (or a different micro controllers) you might want to have a look at this library