[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cups / Samba: force print options / policy *SOLVED*



 hi,

Am 11.02.2014 um 00:15 schrieb Brian <ad44@cityscape.co.uk>:
> 
> Are you relying on none of them reading lpoptions(1)? :)

yes :-), most are happy, if they can print .. ;-)

>> Any suggestions ? Disable raw, redirect every print job to remove „bad
>> things“?
> 
> As before: consult the printer's manual and consider a User Code policy.
> (You previously mentioned a PIN but I don't know whether this is the
> same as a User Code).


yes, it is. But a user code has to be set from the user itself …, so also no option.

But I’am happy to close this thread, because I was able to solve my problem. The solution is more a workaround, but it works as expected. What I have done:

1. Install cups-pdf  
2. Configure your Aficio with the default settings, you want ( in my case, Job Log = Document Server, with default PIN 0000)
3. Configure your Aficio with localhost ACL access only
4. Configure smb.conf to publish your cups-pdf printer
5. Configure cups-pdf to use a post processing script
6. Write a script:

============
#!/bin/bash
CURRENT_PDF="${1}"
CURRENT_USER="${2}"

lp -U $CURRENT_USER -d mensakarte $CURRENT_PDF
rm $CURRENT_PDF
============

If you have several Aficios, extend the script with if / else -d $PRINTER (is exported from Cups), voila, problem solved :-)

With that solution, you can do a lot ;-)

cu denny

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Reply to: