Bug 7446

Summary: nearest doesn't work on RHEL 8
Product: ThinLinc Reporter: Pierre Ossman <ossman>
Component: PrintingAssignee: Pierre Ossman <ossman>
Status: CLOSED FIXED    
Severity: Normal CC: aleta
Priority: P2 Keywords: aleta_tester, relnotes
Version: trunk   
Target Milestone: 4.11.0   
Hardware: PC   
OS: Unknown   
Acceptance Criteria:

Description Pierre Ossman cendio 2019-11-25 13:10:39 CET
Trying to print anything via nearest on RHEL 8 just results in the job failing with "Unsupported raster data."

The error comes from raster2pwg, which for some reason isn't accepting the raster output from ghostscript.

This might be a bug in ghostscript or raster2pwg. However we shouldn't even be going that route. Printing to this printer should result in a conversion to PDF, not PWG.

Printing a PostScript file directly:

> Nov 25 13:04:22 dhcp-254-219.lkpg.cendio.se cupsd[16216]: gstopdf (application/postscript to application/pdf, cost 0)
> Nov 25 13:04:22 dhcp-254-219.lkpg.cendio.se cupsd[16216]: pdftopdf (application/pdf to application/vnd.cups-pdf, cost 66)
> Nov 25 13:04:22 dhcp-254-219.lkpg.cendio.se cupsd[16216]: - (application/vnd.cups-pdf to printer/Office/application/pdf, cost 0)
> Nov 25 13:04:22 dhcp-254-219.lkpg.cendio.se cupsd[16216]: - (printer/Office/application/pdf to printer/Office, cost 0)

Printing via nearest:

> Nov 25 12:59:33 dhcp-254-219.lkpg.cendio.se cupsd[16216]: gstoraster (application/vnd.cups-postscript to application/vnd.cups-raster, cost 175)
> Nov 25 12:59:33 dhcp-254-219.lkpg.cendio.se cupsd[16216]: rastertopwg (application/vnd.cups-raster to image/pwg-raster, cost 100)
> Nov 25 12:59:33 dhcp-254-219.lkpg.cendio.se cupsd[16216]: - (image/pwg-raster to printer/Office/image/pwg-raster, cost 0)
> Nov 25 12:59:33 dhcp-254-219.lkpg.cendio.se cupsd[16216]: - (printer/Office/image/pwg-raster to printer/Office, cost 0)

It seems we are sending things as "application/vnd.cups-postscript" rather than "application/postscript".
Comment 1 Pierre Ossman cendio 2019-11-25 13:22:21 CET
We seem to have tried to address this before by getting rid of $CONTENT_TYPE before passing the data on to the IPP backend for respooling. But it seems to also be looking at $FINAL_CONTENT_TYPE these days. Removing that as well fixes things.
Comment 3 Alex Tanskanen cendio 2019-11-26 14:31:03 CET
Verified that this works with the latest nightly build. I printed out image and checked that the error message "Unsupported raster data" is gone and instead it says "Completed".

The release notes looks good as well.