[Samba] Can't print properly through server, only direct client->printer

Simon Hobson shobson-lists at colony.com
Mon Jul 5 09:13:14 GMT 2004


At 10:32 am +1000 5/7/04, Alex Satrapa wrote:

>>[printers]
>>         print command = grep -v '^[0-9]* *VM\?' <%s >%s-2 ; rm %s ; 
>>lpr -P%p -o raw %s-2
>
>What's this supposed to achieve?  Looks to me like you're tampering 
>with the PostScript by removing any line that starts with 'VM?' 
>optionally preceeded by any number of spaces, optionally preceeded 
>by any number of numeric digits.

That's correct, without it hardly any jobs print at all !

The jobs created on the windows boxes include a test for the amount 
of VM available in the printer, and if it fails to meet what MS 
believe is required then it prints the message :

>This job requires more memory than is available in this printer.
>Try one or more of the following, and then print again:
>For the output format, choose Optimize For Portability.
>In the Device Settings page, make sure the Available PostScript 
>Memory is accurate.
>Reduce the number of fonts in the document.
>Print the document in parts.

There is a PS procedure defined that compares the VM with a number on 
the stack, then prints the above message and aborts the job if it's 
less. The line that invokes the procedure is always :

nnnn VM?^M
(where nnnn is a variable number defining the VM requirements)

which is grepped out by the print command above.

>Obviously the PostScript being generated is working correctly, since 
>direct to printer works fine. What happens if you comment out this 
>parameter, and leave the print command alone?

If I leave the test in, hardly anything works ! Either the PS is 
getting processed by the CUPS server which is behaving differently to 
the printer; or the client is generating a different job because it 
expects the job to be processed by the server; or (unlikely) the 
driver has been corrupted at some stage during the Samba printer 
installation.

The problems are : jobs where certain letters don't print at all, or 
certain letters are replaced with something else; images which look 
like they have had one or more runs of pixels removed, so that the 
image is sliced and the rest of the image is 'rolled round' so that 
what should be the left (say) 1/3 of the image is now to the right of 
the other 2/3.

The problem is, we don't know whether to blame the client (is it 
producing crap when it thinks it's sending the job to a windoze 
server ?), Samba (is it sending the right info to CUPS ?), CUPS (is 
it processing the job instead of passing it through as a raw job).

I've now tried CUPS with logging set to debug, and it clearly treats 
each job as type application/vnd.cups-raw, so it shouldn't be doing 
anything with it.

Simon

-- 
Simon Hobson MA MIEE, Technology Specialist
Colony Gift Corporation Limited
Lindal in Furness, Ulverston, Cumbria, LA12 0LD
Tel 01229 461100, Fax 01229 461101

Registered in England No. 1499611
Regd. Office : 100 New Bridge Street, London, EC4V 6JA.


More information about the samba mailing list