I am trying to write a small script to print the pdf file generated via ReportLabs, Unfortunately, I do not find much inputs for my requirements. I also tried to convert my PDF into an Image object using from pdf2image import convert_from_path, Unfortunately, as the text is printed as an image, the print quality is unacceptable. My requirement is, I am writing a Python project to print Thermal receipts where I should be able to print the content based on the paper size provided. I also tried win32api.ShellExecute(0, "print", file_path, '/d:"%s"' % printer_name, ".", 0). However, this needs an external tool to be a default viewer to print the document. I wanted to avoid dependencies with external applications and wanted to use Python modules for the same. Any suggestions? Ps: It does not need to be in PDF format. Continue reading...