Page 1 of 3

What is involved in writing a Printer Driver? - SOLVED

Posted: Wed Sep 11, 2019 11:12 am
by Falcon
Just before switching to MX, my printer died. I looked for a new printer that had Linux support and found a Canon TR8520 "all in one" printer that stated that they had a Linux driver, so I bought the printer. I used it for a while on Windows 7 and liked its features. Then I changed over the computer's OS to MX and downloaded the Linux driver from the Canon site. The first time I tried to print from MX I discovered that something was amiss. This Linux driver only allows you to print from the cassette on one side of the paper, doesn't allow you to print from the rear tray and can't scan from the printer to the computer as it did under Windows 7. I called Canon tech support and was told that "they chose not to include the additional functions in the Linux driver". Great!

The printer download from the Canon site included the source code for the driver, but the chances are that it only reflects the functions that the Linux driver supports. I would like to be able to use all of the available functions that were included in the Windows driver and in order to do this, I will need to write some driver code. The only problem is that my only programming experience was with BASICA in the 1980s. What is involved in writing a driver for this printer? Am I likely to need more documentation from Canon in order to see how to implement the additional functions that I want? Which programming language would be best to use? Like I said, I haven't done any programming in years, but I'm not adverse to learning something new unless those of you who are more knowledgeable think that I would probably be in over my head. Any information will be appreciated.

Re: What is involved in writing a Printer Driver?

Posted: Wed Sep 11, 2019 12:37 pm
by CrackMeUp
Yup, way over your head, mine too :confused: ... Canons are pretty notorious for minimal Linux support ... that's why there are developer PPAs for Ubuntu-based distros to deal with the lack ... Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.

If you installed all the software from the Canon site, you should have no problem printing ... also if you installed the ScanGear MP .deb you should be able to scan as well ... but not with native Debian scanner apps ... so ....
(1) Turn on your printer, turn the scanner off then on (you only have to do this once so that the driver is detected)
(2) To run ScanGear, you open a terminal session and type

Code: Select all

scangearmp2
Cheers

Re: What is involved in writing a Printer Driver?

Posted: Wed Sep 11, 2019 4:59 pm
by Falcon
CrackMeUp,

Thanks for the reply.

I installed both the printer driver and the Scangear driver. Unfortunately I can only print on one side of the paper from the cassette. Can't print double-sided and can't print from the rear tray at all, which makes it pretty much useless if I want to print photos.

Using Scangear from the computer, I can scan either a single sheet from the platen, or multiple sheets from the document feeder. But I can't scan multiple sheets from the platen and combine them in a single document like I can with the Windows version. I guess I'll have to keep my older computer on Windows 7 so that I can still utilize the full set of features that the printer offers.

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 6:18 am
by srq2625
CrackMeUp wrote: Wed Sep 11, 2019 12:37 pm Unfortunately pure Debian/Debian-based distros like MX don't recommend using PPAs ... NEVER ... they'll bork your system.
While this statement is, in general, true there is one way I know of to make it work and work cleanly. Take the source code and compile it on your system to generate a .deb file. Then install the .deb file.

For the first few years of my Linux life, I did this with darktable and it worked out quite well.

Of course, this only makes sense if you can find a PPA that includes a driver for your printer that supports all the functionality of the printer.

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 8:07 am
by asqwerth
If you do find a PPA, you can post the details in the Package Requests subforum and ask the Packaging Team if the packages within the PPA are compatible with MX18 or whether the packaging team would be able to rebuild it to be Debian-compatible.

https://mxlinux.org/wiki/help-files/mx-faqs/

Important thing is to ask first.

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 10:03 am
by Falcon
Gentlepersons,

Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 10:38 pm
by CrackMeUp
@ Falcon
BTW Win 7 is dead/obsolete/kaput come January 2020 ... you obviously made a bad (luck) choice purchasing that printer ... one of the very few that don't function well/completely with Linux OSes. In my experience with Canons, the Linux drivers (even third-party) are very limited and do not exploit all the features of the printer ... sell the sucker and get yourself a similar HP product ... No-brainer and work(s) OOTB ... any Linux OS will automatically detect/download the drivers for full functionality ... choose the model that fits your needs and go for it ...
https://developers.hp.com/hp-linux-imag ... ices/index ...

Cheers

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 11:09 pm
by JayM
Falcon wrote: Thu Sep 12, 2019 10:03 am Gentlepersons,

Thanks for the ideas and suggestions about this issue. Rather than asking the developers to do a bunch of work for me to try to get this printer functioning fully on MX, it's probably easier to just keep Windows 7 on my older computer and use it in the instances where I need the additional features of the printer. These printers don't last forever, and when it dies, then I will be back to square one trying to find another printer that will work with Linux and asking someone to try to modify a PPA file for me. While it's not the best solution, I think that using the Windows computer is the easiest solution for everyone in the long run.
When you do shop for another printer, check it first at http://www.openprinting.org/printers/ to see how well or poorly it works under Linux.

Re: What is involved in writing a Printer Driver?

Posted: Thu Sep 12, 2019 11:24 pm
by CrackMeUp
@JayM
The link you offered is handy, but unfortunately outdated in it's compatibility database, especially as new printer/model versions are concerned, e.g., the OP's printer (Canon TR8520) isn't even listed ... many others as well ... could list many other reasons not to fully trust their database ... Google-it yourself and you'll get the picture ... therefore, HP is, de facto, one's best choice simply because Linux systems already have the HPLIP software installed ... Google-it yourself and you'll get the picture ... ;)

Re: What is involved in writing a Printer Driver?

Posted: Fri Sep 13, 2019 9:54 am
by Falcon
Guys,

Thanks for the info on the HP printer. I'm sure that I can find someone to give the Canon printer to who will be using the Windows 7 or 10 OS. So are you saying that I can just buy any HP printer and be sure that it will be fully functional? If so, great! I've got a lot of Reward Points stacked up on Amazon and a new printer might be a good way to make use of them.

I only use the Windows 7 computer to run a couple of programs that I need that have no Linux counterpart. When Microsoft ends support for 7, the computer will still be usable for what I need.

BTW I put a Review of the TR8520 printer on Amazon telling prospective buyers that it's Linux support is almost worthless. I hope that someone will think twice before buying it and trying to make it work with their Linux computer.