With a SteamDeck, you can do just that – thanks to the g_printer kernel module. The C code is fairly straightforward, and even lets you configure some aspects of the printer device. Of course ...