Contents

Adding Lenovo Printer to Raspberry Pi (or Other Linux Computers)

One of the main benefits of connecting the printer to Raspberry Pi is to enable remote printing service, even if the printer is a cabled one.

There are already a lot of posts on the internet discussing how you can set up your Raspberry Pi and connect it with your printer (with CUPS), like How to add a printer to your raspberry pi or other Linux Computer. So this is not the main focus of this post.

The focus of this post is on how to extract a PPD file from the original printer driver package provided by the manufacturer, which is needed by the Linux system (and of course, Raspberry Pi), when CUPS doesn’t have native support on it.

Specifically, I am using my Lenovo M7605D as an example.

PostScript Printer Description (PPD) File

Developed by Adobe, the PPD file (Wikipedia) is a piece of information that describes the entire set of features and capabilities available for PostScript printer. Basically it describes how the printer should organize and print the contents when documents are sent to the system printing service.

Locating the PPD file

Once downloaded the driver package (which is an ISO file) from Lenovo Driver Page, extract it and open the folder /install, you’ll see a lot of model folders.

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725212618877.png
The Driver Page

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725213307035.png
The ‘/install’ folder after extraction

Going into that you’ll see a file /install/M7605D/chneng/Brinst_Lang.ini which specifies the folder for the Post-Script driver for the model:

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725214711228.png
The location of PostScript driver

Going into that dir you’ll see some .pp_ files, and that’s what we want

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725215405411.png
Driver found! It seems my model m7605d is using the same driver as m7675dxf/m7615dna

Uncompressing the .pp_ file

It turns out that the ppd file provided by Lenovo, which has ‘pp_’ as suffix, is compressed. (originally I thought it is encrypted when I saw those gibberish in the file but it is actually not)

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725220428041.png
The file head ‘SZDD’ in the beginning shows that it is an old compressed format, which is rare to see now
/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725221019932.png
SZDD file info on Wikipedia

Having a quick search on Google makes me aware of that this format could be uncompressed by MS-DOS EXPAND.EXE program. And surprisingly also, it could be directly uncompressed by 7-ZIP.

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200725221752876.png
It turns out that the file could be directly uncompressed by 7-ZIP, or in a more geek’s way, using windows ‘EXPAND’ command

In the end, the .ppd file is nicely extracted.

/en/posts/2020/adding-lenovo-printer-to-raspberry-pi/image-20200726001822968.png
Done!