Text printing as a PDF
Hello,
I'm probably asking an old question, but when I print from a simple Linux text editor like xed to a simple parallel port dot matrix printer, I get all the random seeming output of a PDF. Wherever I search online about this, I only see links to the opposite problem--ways of turning text into PDF. How do I keep text from outputting as a PDF? I want my text RAW, or text. I thank you for your time. WayCon |
I have never encountered anything like this, so I have no answers, but some questions:
What distro/version are you using? (Your user agent icon says "Ubuntu," but that could be Ubuntu or a derivative.) What happens when you print a test page via CUPS (http://localhost:631)? Which text editor(s) have you tested for this? (I doubt it makes a difference, but it would be nice to fill in the picture.) Would it be possible to post a scan of one of these print-outs to bring to life what the phrase "output of a PDF." |
Does the printer work under any condition? Did it ever?
You are not seeing PDF you are seeing wrong printing. What you see echo "Y helo thar" > /dev/lp0 Or more text-file | lp |
Maybe, the default print output format from GUI applications is PDF so it depends on how the printer is configured.
How did you setup your printer in cups? What is the make and model number of the printer? All of the old legacy print drivers are now maintained by Open Printing now days since many distributions do not install them by default anymore nor by Apple (They own cups). http://www.openprinting.org |
1 Attachment(s)
Attachment 36357
Hello frankbell, I am trying to attach a poor photo of the print out. It's pretty clearly page description output, or so I believe. The quality is poor because the ribbon is old and dried up. This is what I got when I went to CUPS as you suggested and I hit the print test button. Thank you, WayCon |
To expand on jefro's post you can try printing directly to the printer and bypass cups via the command
cat file.name > /dev/lp0 |
Hello, jefro,
The printer is one of several that I have used on and off for some years with Windows 10, Windows 7, and with other, older machines, so it is working. Hello, michaelk, I installed the printer through the print installer on my Mint machine. It did see it as an Epson printer, so I used the driver suggested and also I tried the most absolutely generic set up the print installer offered. I am certainly willing to give you any specific information you want. What would be useful? I thank you both, WayCon |
Quote:
Unfortunately, the photo was so faint that I could not discern anything helpful. But, again, thank you very much for trying. I will continue to follow this thread, as I want to know what the heck is going on here! |
"Windows 10, Windows 7, and with other, older machines, so it is working."
I should have included the word Linux. Does it work or ever work in linux on your system under any condition? Can you print the configuration from only the printer? Usually power on while holding one or two menu keys and it prints the current configuration. |
Have you tried my suggestion in post #6?
I'm wondering if you will have to setup your own cups filter to convert PDF back to text. |
Hello, all,
And thank you, everybody, This is what I've done on localhost:631 : Description: EPSON TM-P2.01 Location: wc-O-Plex-960 Driver: Epson 9-Pin Series (grayscale) Connection: parallel:/dev/lp0 Defaults: job-sheets=none, none media=na_letter_8.5x11in sides=one-sided ID Name User Size Pages State EPSON-TM-P2.01-3-42 Test Page anonymous 1k 1 processing since Mon 10 May 2021 11:09:09 PM EDT "Rendering completed" It prints out one 40 character line every several minutes. |
The one above was based on a driver that CUPS, I guess, in printer set up found itself.
I get rather similar results if I use the most generic set up I could find: Description: printer Location: Driver: Local Raw Printer (grayscale, 2-sided printing) Connection: parallel:/dev/lp0 Defaults: job-sheets=none, none media=unknown |
This type of Epson printer I was using, back when I was really running everything on Dos, so I don't think it really needs or, ordinarily, uses drivers. Of course I could be wrong, but I imagine there must be a solution, somewhere.
|
Quote:
Aside from the "/dev/lpt0" suggestion mentioned above -- which I haven't tried since the pre-CUPS era -- have you tried something like: Code:
$ lpr -l plain.txt If you're into programming, a simple filter could be written to change all LFs to CR/LFs which would let you issue: Code:
$ crlffilter < plain.txt | lpr -l - I'm betting that CUPS doesn't put a lot of effort into optimizing their dot matrix printer support. Q: Where do you find tractor-feed paper and ribbons for those old beasts nowadays? (I was just joking with someone today about "disa-perf" paper. :^D ) HTH... |
In order for cups to print to a text Epson type printer the PDF file needs to be converted via a raster filter and I believe the required filter is rastertoespon. Mint does have the raster filter so something must be amiss with cups somewhere or it is possible the raster filter does not work anymore. I have a Zebra label printer and it no longer "works" with later cups versions due to the raster filter. I have yet to figure it all out but Michael Sweet (The original cups developer) had to create a special spooler program because I think that Apple screwed it up. From what I can tell they had a falling out and he no longer works for Apple.
A raw printer bypasses the filters so that is not going to work with PDF formated output. Printing from the command line would send plain text directly to the printer instead of PDF and was requested as a test. https://www.cups.org/doc/raster-driver.html |
All times are GMT -5. The time now is 09:16 AM. |