This is just to understand how things work or not work!
My printers are a Samsung laser and an Epson Dot-matrix. I am writing an Indian language document using kwrite. I can print alright from kwrite. Also, the same document I can compose on Libreoffice and print perfect. No issue there.
I tried printing kwrite file (*.txt) dircet from ‘lp’. Now, the Indian language characters in the document are left blank. But the English language characters print. To understand what is happening, I read up a bit on cups and looked up the spool control file. When printing from kwrite , the spool control file sees the mime as application/pdf. See below.
job-priority2job-uuid-urn:uuid:6ee6edc9-a427-3bb3-6752-401957080557Bjob-originating-host-name localhost!time-at-creationN]��time-at-processing!time-at-completedN]��!job-id!# job-state!▒job-media-sheets-completedEjob-printer-uri)ipp://linux-pbod.site/printers/epsonlx300!
If I direct print the same document using ‘lp’ command, the mime is seen as text/plain.
linux-pbod:/var/spool/cups # cat c00035
job-sheetsnoneBnone! number-upjob-uuid-urn:uuid:90085c8c-66d8-393a-4d07-c4fe107a8911Bjob-originating-host-name localhost!time-at-creationN]��time-at-processing!time-at-completedN]�!job-id## job-state!▒job-media-sheets-completedEjob-printer-uri)ipp://linux-pbod.site/printers/epsonlx300!
I understand that. kwrite is converting to pdf before sending to print-spooler. For ‘lp’ , the document remains a plain/text document.
But what I do fail to understand is, the text/plain document should have been processed by spooler(cups) filter texttops and then printer filter foomatic-rip. If such processing had taken place, the print output should have been equal to what kwrite produces. I suspect cups is sending it raw to the printer and as printer does not understand the UTF-8 encoded characters, not have the font, is not able to print. Now, my questions are,
Isn’t cups ( here, ‘lp’) supposed to process text/plain before sending to printer,?
OR is it that cups is missing something like the font information while processing and hence is not able to process the Indian language characters, encoded in UTF-8.
How to find out?