You seem to be using Windows, so start with this - the answer will change if you are using Linux.
There are two ways to print in Windows. The first most common way is to send individual drawing commands through the Windows GDI. To do this, you must place each individual element on the page in the right place (text lines, images and shapes) when choosing the right colors and fonts. It is easy if you generate the data yourself, it is much more difficult if you need to analyze the file you are reading.
Another option is to send to the printer in "raw" mode, when the printer driver will cost a lot. To do this, the printer must naturally understand the byte stream that you feed it. There are some printers that understand Postscript from the beginning, but I'm not sure about PDF, and PRN is not a standard format.
I have never done rough printing through Python itself, but here is a link to a short piece of sample code (and the idea of ββthe expected problems): http://bytes.com/topic/python/answers/512143-printing-raw-postscript-data-windows
source share