ps2ps is adding BS to the end of my jobs...
Brad Langhorst
brad at langhorst.com
Thu Oct 13 22:54:48 PDT 2005
Michael Sweet wrote:
> Brad Langhorst wrote:
>
>>
>> I'm running jobs from windows clients through cups' pstops to strip
>> out color information.
>>
>>
>> ...
>> ehsave restore^M
>> (%%[LastPage]%%) = ^M
>> %%EOF^M
>> ^Duserdict/ESPwl{}bind put
>>
>> %%Trailer
>> %%Pages: 0
>> %%EOF
>> ^D
>>
>>
>> note that cups has added a second EOF and ctrl-D
>> I think it's not correct to add information after a ctrl D
>>
>> this is causing my printer to barf...(rightly so i think...)
>>
>> what can i do to fix the problem?
>
>
> Stop using Foomatic.
>
Sorry to be thick... I don't see where foomatic is involved. Samba
spools the job to cups which runs pstops and then sends the job along to
the printer. Is foomatic inside of cups? Is that just saying use -oraw?
I can munge pstops.c at about line 600 with this
else if ((!strncmp(line,"%%EOF",5)) || (!strcmp(line, "\004") &&
len == 1) )
{
/*do nothing with EOF or ctrl-D */
}
else if (strncmp(line, "%%Pages:", 8) != 0)
pswrite(line, len, stdout);
which eliminates the first EOF and ctrl-D but does not seem to strip out
the color info as i want it to - this despite the presence of
%%BeginFeature: *XRXColor BW
<<
/DeviceRenderingInfo currentpagedevice 1 index get 1 dict copy
dup /VirtualColorDevice <<
/Type 1
/ColorTransform /Gray
>> put
>> setpagedevice
%%EndFeature
in the ps file
Is it not possible to strip the color info from this input by directing
the output through pstops?
I hope I'm not hammering a screw...
brad
More information about the cups
mailing list