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

Simon Hobson shobson-lists at colony.com
Tue Aug 31 13:14:30 GMT 2004


At 2:57 am +1000 6/7/04, Alex Satrapa wrote:

>What happens if you change the line to:
>
>     print command = grep -v '^[0-9][0-9]* *VM\?$' ...

Then I replied :

>It would have to be '^[0-9][0-9]* *VM\?^M$', but it didn't seem to 
>match that. I think the chances of having a line that starts with 
>that pattern is pretty remote, especially when you consider that it 
>is Postscript code (or what the MS system passes for Postscript !) 
>rather than raw text.

Well I had the techie in recently for some other work and we had a go 
at this problem. Well in one of those 'Homer-esque' Dohhh moments we 
found out the problem ....

Anyway, in case it helps anyone else, we had the line :

print command = grep -v '^[0-9]* *VM\?' <%s >%s-2 ; rm %s ; lpr -P%p 
-o raw %s-2

in our smb.conf file. This is to do away with the test MS do in the 
postscript file to see how much memory the printer has and not print 
the job if MS decide the printer can't do it (I've yet to see a job 
actually fail).

What this should do (or more correctly, what I intended it to do) is 
delete any lines that start with some digits, some spaces, and the 
literal "VM\?". Once we realised what the problem was and checked 
again, I found that this also matched lines like :

3V)_5qZ$%5r88#qrUKaWQ9d>)o\)#Gn,;eDpH2$<qp4]kqY>7h>5e3apA4FPq"XOYo_J(XoDeC]

and

9VL at hY.WEXoDeL^pA+CXo)SFQp&+FcoCr(NhoYo4!l;X`q8**G!l2XhrPSKMqS<3J_tq=I`pq"I

These lines are part of the image data for bitmapped images on the page.

Altering the match to '^[0-9][0-9]* VM\?' seems to have fixed the 
problem. However I'm curious as to why the two lines above were 
matched when they don't even include the letters 'VM' ?

Simon




And for the benefit of anyone searching the archives ...

The message this is designed to get rid of is :
>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.

-- 
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