[cups.general] Hacking mime.types

Michael R Sweet msweet at apple.com
Tue Dec 18 15:56:34 PST 2007


Tim Kelley wrote:
> I'm having a problem with postscript files generated by a certain application being rejected by cups as invalid (no %%Pages string)
> This application fortunately also puts its name in the postscript file so they can easily be identified.
> 
> Can't I put something in mime.types, before postscript, something to the effect of:
> 
> application/postscript-other  eps string(bytes,"%%Creator: ArcInfo 8.1")
> 
> and then in mime.convs exclude it from the pstops filter that rejects it?
> 
> Problem is, I have no idea what to put in the first field there ... the man page says

Use "contains" instead:

     contains(0,2048,"%%Creator: ArcInfo")

Also, use an alphabetically smaller name, e.g.:

     application/arcinfo-ps string(0,"%!") && \
                            contains(0,2048,"%%Creator: ArcInfo")

Finally, it is best to create a new .types file (and .convs file)
for your file type, e.g. "arcinfo.types" and "arcinfo.convs".

-- 
______________________________________________________________________
Michael R Sweet                        Senior Printing System Engineer





More information about the cups mailing list