I am using a Dot Matrix Printer (Oki Microline 321 Turbo) plugged into my computer. I have a python program that generates HTML, converts it to a PDF. However an issue only ever arises when my program tries to send that PDF to the printer. The dot matrix makes two strikes on the paper, before continuously feeding it through seemingly without stopping. Other times the printer emits gibberish. However when I use the system dialog (opening the PDF in the file browser and printing it) the dot matrix springs into life and perfectly reproduces it. The same issue occurs when I run lpr or lp output.pdf on the command line. This occurs with every image or PDF file I try to run. I am able to print text files on the printer perfectly, but due to my project needing markdown I need an image file of some description.
I have tried using the command line to change the issue, But this has not worked. I have tried re configuring settings via CUPS but have not been able to have success. Is there any solution to this? Surely there is a way to make CUPS utilize whatever the system dialog is using to achieve the same effect? When using the system dialog, I can print every single image I want, with no errors? How do I make this work?