Skip to contentSkip to conversation

Useful utility: cups-filter-check

Printing-architecture Tim Waugh 4 participants 8 messages Dec 16, 2013 – Jan 2, 2014

lore
Share & tools
lore

Tim Waugh

author
#0 lore raw

Hi,

Last week I put together a small program to simply display the filter pipelines that would be used for each configured input format and each likely output format (CUPS raster, PostScript, PDF).

This is useful for sanity-checking changes to CUPS filter costs, to check whether changes to pipelines are intentional or accidental.

It's based on testmime.c and is very simple. See what you think:
https://gitorious.org/cups-filter-check

Tim.
*/

#1 lore raw

Should we perhaps make this part of cups-filters?

Till

Quoted 22 lines · Tim Waugh

Hi,

Last week I put together a small program to simply display the filter pipelines that would be used for each configured input format and each likely output format (CUPS raster, PostScript, PDF).

This is useful for sanity-checking changes to CUPS filter costs, to check whether changes to pipelines are intentional or accidental.

It's based on testmime.c and is very simple. See what you think:
https://gitorious.org/cups-filter-check

Tim.
*/

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

#2 lore raw

Till,

I was thinking I could just add an option to the cupsfilter program (--dry-run or something) that displayed the list of filters that would get used.

Quoted 28 lines · Till Kamppeter

Should we perhaps make this part of cups-filters?

Till

Quoted 17 lines · Tim Waugh

Hi,

Last week I put together a small program to simply display the filter pipelines that would be used for each configured input format and each likely output format (CUPS raster, PostScript, PDF).

This is useful for sanity-checking changes to CUPS filter costs, to check whether changes to pipelines are intentional or accidental.

It's based on testmime.c and is very simple. See what you think:
https://gitorious.org/cups-filter-check

Tim.
*/

Quoted 5 lines

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

Quoted 4 lines

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

_______________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

author
#3 lore raw
In reply to Till Kamppeter
Quoted 1 line · Till Kamppeter

Should we perhaps make this part of cups-filters?

Yes, sure -- or Michael Sweet's suggestion of enhancing cupsfilter would also be fine. It's quite nice to be able to loop over all of the configured MIME types though. I guess it can be done in a shell script (reading *.types)... it just might not be very pretty:

grep '^[^[:space:]#]' /usr/share/cups/mime/mime.types | (while read t; do set $t; echo $1; done) | sort

Incidentally, while playing around with it I noticed the only route from application/vnd.adobe-reader-postscript -> application/vnd.cups-pdf is via image/tiff. Is that intentional? I expect any printer capable of handling PDF can also handle PostScript, and that path works fine at less cost.

Tim.
*/

#4 lore raw

Tim,

Quoted 6 lines · Tim Waugh

...
Incidentally, while playing around with it I noticed the only route from application/vnd.adobe-reader-postscript -> application/vnd.cups-pdf is via image/tiff. Is that intentional? I expect any printer capable of handling PDF can also handle PostScript, and that path works fine at less cost.

I'm guessing the reason for this is Adobe's stupid enforcement of PDF form content protection - some forms can't be processed by Ghostscript or Adobe's own PS distiller to generate PDF because of restrictions that are placed in the PostScript code. But it is A-OK to RIP the content for printing/export to an image... :/

But yes, if the printer reports support for PostScript then application/vnd.adobe-reader-postscript should go to application/vnd.cups-postscript without a side-trip through TIFF and PDF...

_______________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

#5 lore raw
Quoted 12 lines · Michael Sweet

Tim,

Quoted 6 lines · Tim Waugh

...
Incidentally, while playing around with it I noticed the only route from application/vnd.adobe-reader-postscript -> application/vnd.cups-pdf is via image/tiff. Is that intentional? I expect any printer capable of handling PDF can also handle PostScript, and that path works fine at less cost.

I'm guessing the reason for this is Adobe's stupid enforcement of PDF form content protection - some forms can't be processed by Ghostscript or Adobe's own PS distiller to generate PDF because of restrictions that are placed in the PostScript code. But it is A-OK to RIP the content for printing/export to an image... :/

For going this way I suggest to go

PostScript --gstoraster-> CUPS Raster --rastertopdf-> PDF ...

as first, imagetopdf/imagetoraster supports only single-page TIFF and HPLIPs pstotiff filter only produces monochrome low-res TIFF for faxing.

rastertopdf needs to get created anyway for making CUPS a complete IPP Everywhere implementation, as IPP Everywhere printers need to take PWG Raster as input format. See

http://www.cups.org/str.php?L4266

Quoted 1 line

But yes, if the printer reports support for PostScript then application/vnd.adobe-reader-postscript should go to application/vnd.cups-postscript without a side-trip through TIFF and PDF...

Yes, this I already cover in cups-filters, application/vnd.adobe-reader-postscript is converted into application/vnd.cups-postscript through pstops, without PDF detour.

Till

#6 lore raw
In reply to Tim Waugh

I'd love to have this in the cups-filters package. Great idea.

2013/12/16 Tim Waugh <[email protected]>

Quoted 22 lines

Hi,

Last week I put together a small program to simply display the filter pipelines that would be used for each configured input format and each likely output format (CUPS raster, PostScript, PDF).

This is useful for sanity-checking changes to CUPS filter costs, to check whether changes to pipelines are intentional or accidental.

It's based on testmime.c and is very simple. See what you think:
https://gitorious.org/cups-filter-check

Tim.
*/

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

#7 lore raw

All,

I filed CUPS STR #4325 to track adding this to the cupsfilter command:

    https://www.cups.org/str.php?L4325
Quoted 26 lines · Alex Korobkin

I'd love to have this in the cups-filters package. Great idea.

2013/12/16 Tim Waugh <[email protected]>
Hi,

Last week I put together a small program to simply display the filter pipelines that would be used for each configured input format and each likely output format (CUPS raster, PostScript, PDF).

This is useful for sanity-checking changes to CUPS filter costs, to check whether changes to pipelines are intentional or accidental.

It's based on testmime.c and is very simple. See what you think:
https://gitorious.org/cups-filter-check

Tim.
*/

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

Quoted 4 lines

_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair