cups-filters icon indicating copy to clipboard operation
cups-filters copied to clipboard

Issue with universal filter, CONTENT_TYPE and custom filter

Open trialuser02 opened this issue 8 months ago • 0 comments

Hello. I'm trying to adopt my custom filter to work the the latest cups-filters-2.0 and "universal" filter. My custom filter converts custom input file to application/pdf, so the cups builds the following filter chain:

[Job 61] customdatatopdf (custom/data to application/pdf, cost 80)
[Job 61] - (application/pdf to application/vnd.universal-input, cost 0)
[Job 61] universal (application/vnd.universal-input to application/vnd.cups-postscript, cost 0)
[Job 61] - (application/vnd.cups-postscript to printer/Virtual_PDF_Printer, cost 0)

But after conversion to application/pdf "universal" filter tries to convert from "custom/data" to "application/vnd.cups-postscript", but should use application/pdf as input content/type:

[Job 61] cfFilterUniversal: Converting from custom/data to application/vnd.cups-pdf

It uses CONTENT_TYPE environment variable to determinate input data type, but it is not correct in this case. I guess, "universal" filter should be usable in conduction with other filters, not for single usage only.

Am I right?

trialuser02 avatar Oct 13 '23 15:10 trialuser02