OpenPrinting / ps-printer-app

PostScript Printer Application
Apache License 2.0
40 stars 13 forks source link

Uploading of a malformed ppd leads to bad user experience #12

Closed ajoga closed 1 year ago

ajoga commented 2 years ago

Summary

Uploading a malformed PPD shows a successful upload, but of course on the Add printer page the corresponding driver is absent from the Driver name menu.

Steps to reproduce

Facultative : get official PPD from authoritative source

Fetch the PPDs from http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX for the C3900 laser printer. It is also attached to this issue here.

Steps to reproduce

1

Hints

I was put on track about the malformed PPD thanks to a warning in the logs : W [2022-02-18T13:32:20.164Z] libppd: [PPD Collections] Missing Product in /var/snap/ps-printer-app/common/ppd//secc3900.ppd!

Thankfully the tool cupstestppd made me on track that the Product property of the PPD was misformatted ; setting it from the original value of EPSON AL-C3900 to (AL-C3900) leads ps-printer-app to display the printer in the Driver name menu :

4

Expected hebavior

tillkamppeter commented 1 year ago

Now uploading a malformed PPD warns the user with the same output as cupstestppd does. The PPD will not get rejected but at least the user gets warned.

Thanks, @metabiswadeep for your great work on this!