Hacking mime.types

Tim Kelley kelletim at gmail.com
Tue Dec 18 12:44:59 PST 2007


> 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
>
> string(offset,"string")
>     True if bytes are identical to string
>
>  how do I calculate the offset ... ??
>
> I tried:
>
> mime.types (before the postscript entry):
> application/vnd.arcinfo-ps      eps string(0,"%%Creator: ArcInfo 8.1")
>
> mime.convs
> application/vnd.arcinfo-ps application/vnd.cups-raw 0 -
>
>
> but looking at the logs I see
> envp[24]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
>
>
> The file gets sent to the printer and the job is marked "completed" but they do not print. If I print them with -o raw they print fine.
>
>

I can actually get this to work but only if I comment out application/postscript from mime.types. Obviously this isn't a good idea. I have the custom type first ...




More information about the cups mailing list