Re: [Samba] Can't print properly through server, only direct client-printer
Doug VanLeuven wrote: print command = grep -v '^[0-9]* *VM\?' %s %s-2 ; rm %s ; lpr -P%p -o raw %s-2 I read ^[0-9]* *VM\? as match 0 or more occurances of a digit at the beginning of a line match zero or more occurances of a space match a V optionally match one M (shell interpretive issues with backslash and ?) 3V)_ and 9VL@ both meet that criteria. rather ^[0-9]+ +VM\\[?] if you're looking for 0 VM\? I find it helpful to eliminate shell issues by making special characters in a class A regular expression may be followed by one of several repetition oper- ators: ? The preceding item is optional and matched at most once. * The preceding item will be matched zero or more times. + The preceding item will be matched one or more times. Just goes to show what a fresh pair of eyes can spot ! Interestingly, I tried [0-9]+ and it doesn't select anything, whereas [0-9][0-9]* does. And now I see why VM\? failed, the \ was to escape the ?, and I overlooked the meaning of ? Anyway, I settled on '^[0-9][0-9]* VM[?]^M$' (where the ^M is a return, not two characters) which should be safe - I think in the past I must have tried $^M which of course doesn't work. Just proves that most of us still have plenty to learn ! Thanks, 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
Simon Hobson wrote: Interestingly, I tried [0-9]+ and it doesn't select anything, whereas [0-9][0-9]* does. And now I see why VM\? failed, the \ was to escape the ?, and I overlooked the meaning of ? Anyway, I settled on '^[0-9][0-9]* VM[?]^M$' (where the ^M is a return, not two characters) which should be safe - I think in the past I must have tried $^M which of course doesn't work. Just proves that most of us still have plenty to learn ! That's right. Like me. Forgot grep loses the special meaning of + and ? and \+ \? bring the special meaning back. Have to use egrep or grep -E with my expression Cheers, Doug -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
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]kqY7h5e3apA4FPqXOYo_J(XoDeC] and [EMAIL PROTECTED])SFQp+FcoCr(NhoYo4!l;X`q8**G!l2XhrPSKMqS3J_tq=I`pqI 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
I read ^[0-9]* *VM\? as match 0 or more occurances of a digit at the beginning of a line match zero or more occurances of a space match a V optionally match one M (shell interpretive issues with backslash and ?) 3V)_ and 9VL@ both meet that criteria. rather ^[0-9]+ +VM\\[?] if you're looking for 0 VM\? I find it helpful to eliminate shell issues by making special characters in a class A regular expression may be followed by one of several repetition oper- ators: ? The preceding item is optional and matched at most once. * The preceding item will be matched zero or more times. + The preceding item will be matched one or more times. Simon Hobson wrote: 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]kqY7h5e3apA4FPqXOYo_J(XoDeC] and [EMAIL PROTECTED])SFQp+FcoCr(NhoYo4!l;X`q8**G!l2XhrPSKMqS3J_tq=I`pqI 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
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\?$' ... 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. 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
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 : VM?^M (where 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
On 5 Jul 2004, at 19:13, Simon Hobson wrote: 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 ! [snip] The line that invokes the procedure is always : VM?^M (where is a variable number defining the VM requirements) What happens if you change the line to: print command = grep -v '^[0-9][0-9]* *VM\?$' ... That way you can avoid chopping out lines that just happen to start with VM (eg: base64 encoded cruft). I'm just curious. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Can't print properly through server, only direct client-printer
On 3 Jul 2004, at 19:13, Simon Hobson 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. 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? Alex PGP.sig Description: This is a digitally signed message part -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Can't print properly through server, only direct client-printer
We are having great problems printing from XP clients through our Samba server. We are using the Adobe PS driver, and are configured for automatic driver download/install from the server. Samba is 2.2.8a and part of a Suse OpenExchange server, printing is through CUPS. Printers are an assortment of different makes of Postscript (and compatible) lasers. Basically, we have 'wierd' behaviour. Excel documents send as landscape which are formatted for landscape, but not rotated on the page; jobs which just don't print at all (postscript errors); Printouts where every occurance of a particular character is missing, or characters are changed. If we re-configure the clients to talk directly to the printers via an IP port, they work fine with the same drivers and PPDs. I've configured CUPS to support raw printing (as per 8.5.14 in the Samba Howto). Anyone got any ideas what could be wrong ? Simon smb.conf extracts : [global] printcap name = CUPS printing = cups [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = @ntadmin,@root force group = ntadmin create mask = 0664 directory mask = 0775 guest ok = Yes [printers] comment = All Printers path = /var/tmp create mask = 0600 guest ok = Yes printable = Yes print command = grep -v '^[0-9]* *VM\?' %s %s-2 ; rm %s ; lpr -P%p -o raw %s-2 browseable = No -- 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. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba