LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-11-2021, 11:45 AM   #16
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314

I can remember this from when I had a DMP — it's why I gave up on it. Linux generally works on the theory that you have a graphics printer: it used to generate postscript files for the printer and now often generates PDFs instead. The give-away in your printer configuration is "grayscale" — text obviously wouldn't be described this way. That's why everything is so slow. Incidentally, are you sure about the model? The TM series are small point-of-sale models.

As has been said, you can send text files directly to a printer by using lpr with unformated output sent to the port /dev/parport0 or /dev/lp0.
 
Old 05-11-2021, 08:08 PM   #17
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,383

Rep: Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762Reputation: 2762
Quote:
Description: EPSON TM-P2.01
That is an old model from circa 2009 that dates back to when Epson was known for lack of Linux support,

Epson does supply a Linux driver for the TM series, but that particular model is not in the list of supported models.

PS - As best as I can make out from the photo, the output is coming from a banner page in CUPS. The text seems to be properly formed.
 
Old 05-12-2021, 06:05 PM   #18
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 710
Blog Entries: 1

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
There is a way, when setting up cups create a printer by trying the following.

Set "make" = raw in "Add Printer",this works great for my Dot Matrix FX-100.

I saved the screen prints and can attach them in a new post if people want them.


IGNORE BELOW, miss-read OP text

Here is what you can do, you need enscript(1) and ps2pdf(1):

Code:
enscript -p file.ps file.txt
ps2pdf file.ps file.pdf
HTH
John

Last edited by jmccue; 05-12-2021 at 06:24 PM. Reason: fixed
 
Old 05-14-2021, 10:57 AM   #19
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Thank you, nrturn,

I tried writing in dosemu.conf both:

Quote:
$_lpt1 = "lpr -l plain.txt"
and
Quote:
$_lpt1 = "crlffilter < plain.txt | lpr -l -"
but they didn't produce anything.


And thank you, michaelk,

For the information. I note that "ppdc - cups ppd compiler (deprecated)," so I suspect that you are right about Michael Sweet having had a falling out with the Apple people, and I imagine that trying to work with the raster filter will be unsuccessful.

Last edited by WayCon; 05-14-2021 at 10:58 AM.
 
Old 05-14-2021, 11:43 AM   #20
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Thank jmccue, John, for the suggestion,

But when I try to
Quote:
"make" = raw
I can't find "raw" as a choice either in http://localhost:631/ or with the "localhost" "+ Add" function.


Also, thank you, DavidMcCann,

My printer is a receipt printer. And I do have my "Generic Text-Only Printer" set as "Device URI" "parallel:/dev/lp0"
 
Old 05-14-2021, 02:45 PM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
A raw printer does not change the source just not go through a filter so the output will be the same.

Did you ever try printing the file via cat file_name > /dev/lp0?
 
Old 05-14-2021, 06:13 PM   #22
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Hello, michaelk,
I printed out a simple text file with no line over about 30 words with the cat command as you suggested. The result was the same, herky-jerky, slow printing.
Mysterious.
Wayne

Last edited by WayCon; 05-14-2021 at 06:15 PM.
 
Old 05-14-2021, 07:03 PM   #23
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
At least was the output readable? I did not expect slow printing.

I had a thought using a custom back end would work but maybe not.
 
Old 05-15-2021, 11:03 AM   #24
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,150

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Quote:
Originally Posted by WayCon View Post
I printed out a simple text file with no line over about 30 words with the cat command as you suggested. The result was the same, herky-jerky, slow printing.
I didn't think of using cat, but that really should have worked as it didn't give the computer any opportunity to alter the file. I suspect the explanation here is hardware, not software. Either the parallel port has developed a fault or, far more likely, the printer has reached its use-by date.
 
Old 05-15-2021, 12:38 PM   #25
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Hello, michaelk and DavidMcCann,
Thank you for your input. As to David's comment, just above, I've had this same printing problem on two different computers with at least three Epson receipt printers of two different, but similar, types. I'm wondering if, within the context of a possible dispute between Michael Sweet and the Apple CUPS people, perhaps, there isn't a fully implemented means to use a parallel printer on a Linux machine. Of course, what both of my computers also had in common was that they were 32-bit machines running dBase on dosemu. And all the printers were Epson impact receipt printers.

Last edited by WayCon; 05-15-2021 at 12:40 PM.
 
Old 05-15-2021, 01:15 PM   #26
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
I had a HP LaserJet 4 printer connected via a parallel port for around 15 years that worked perfectly with linux until it died but that was back in ancient times. I have been using printers with network interfaces ever since.

You did not post if you are using a USB adapter or a true hardware port but hard to determine where the problem lies. I was expecting the printer to be just Espon ESC/P printer language compatible which should not be a problem with using cat. Basically just sending characters to the printer just like DOS would. Make sure there are no zombie process still wanting to use the printer or parallel port.

As aside note I prefer using FreeDOS via VirtualBox versus DOSemu for running legacy DOS programs like dBase but I had a few minor problems with its latest version. No virtual parallel port interface but I created a suitable network hack to send printer output.
 
Old 05-15-2021, 06:14 PM   #27
Bonzoo
Member
 
Registered: Sep 2018
Location: Costa Rica
Distribution: Antix21a2,Parrot rolling,MXfce19.4,Sparky Openbox
Posts: 233

Rep: Reputation: 48
Go to any web page and try cntrl P on the keyboard. It'll likely show your printer or offer print to pdf.

If there is no printer regroup to a "software center" of the distro and "install printer"Most distros simply unplug your printer and replug while the machine is running and it "might" say" x______ printer plugged in and maybe ask to install it.

Last edited by Bonzoo; 05-15-2021 at 06:22 PM.
 
Old 05-16-2021, 01:35 PM   #28
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Hello, again,
I guess I'll give up for now on connecting my dosemu driven dBase application to a parallel printer. I can't seem to find very complete documentation on line. Could someone tell me what would be the line (presumably in dosemu.conf) to direct my dBase output to my "Canon_MG2100_series" printer? This printer works properly on my Linux Mint machine.
Thank you,
Wayne

Last edited by WayCon; 05-16-2021 at 01:39 PM.
 
Old 05-16-2021, 01:52 PM   #29
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
If your Cannon printer's print queue name is Canon_MG2100_series then try:

Quote:
$_lpt1 = "lpr -l -P Canon_MG2100_series"
The -l is raw printing mode option. Try it both ways and see what happens.
 
Old 05-16-2021, 03:19 PM   #30
WayCon
Member
 
Registered: Sep 2019
Posts: 77

Original Poster
Rep: Reputation: Disabled
Thank you, michaelk,
I'll do that right now.
Wayne
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Download a PDF/web page as "text" PDF (ie. not a picture)? littlebigman Linux - Software 7 01-28-2020 06:35 PM
Unsupported PDF data for Direct Print :1000 when printing a PDF document vishnu14 Linux - Server 5 10-18-2019 06:56 AM
[SOLVED] printing the text from a web page without printing the graphics newbiesforever Linux - General 15 03-21-2018 06:39 AM
[SOLVED] Variables in text file, how to get their values when printing out the text? idaham Linux - General 2 04-14-2010 03:28 AM
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration