2

We have a Sharp department printer MX 2640. I downloaded the required PPD from the Sharp site and installed it using the CUPS Gui on localhost:631

The department requires us to identify by "user identification" (Actually in German it reads Benutzernummer, which would be literally "user number"). This is an account number, as more but one department print to this printer.

EDIT: The feature I am looking for is acutally "Account tracking".

The Windows GUI has an option to set this feature, but how to set it using CUPS? Without that number, jobs get silently ignored. (printer seems to accept job but ignores it)

  • Do you know where the {printer}.ppd file is located? And the printer name (I mean the device name ;) )? – Rinzwind Jul 5 '13 at 7:29
1

File to change is /etc/cups/ppd/{your_printer_id}.ppd. You need to find or add these 3 lines in the section (sharp is a name I made up for this example):

*cupsFilter: "application/vnd.cups-raw 0 sharp1"
*cupsFilter: "application/vnd.cups-command 0 commandtops"
*cupsFilter: "application/vnd.cups-postscript 0 sharp1"

Then create a file (name of the file needs to match the name in the previous file)...

/etc/cups/ppd/{your_printer_id}.conf

and put these lines in it:

ACCOUNTNUMBER="{account_number}"

, replacing {account_number} with your actual account number. According to Sharp documentation, this number is alway 5 digits in length, prepending with zeros, if necessary. Next you need a filter that has the same name as you used above:

 /usr/lib/cups/filter/sharp1

and put this in it:

#!/bin/bash

source /etc/cups/ppd/${PRINTER}.conf

echo -en "\033%-12345X"
echo -en "@PJL SET ACCOUNTNUMBER = \"${ACCOUNTNUMBER}\"\015\012"`

cat -

echo -en "\004\033%-12345X\015\012@PJL EOJ\015\012"
echo -en "\033%-12345X"

This file needs to be executable (sudo chmod +x /usr/lib/cups/filter/sharp1) Now for the tricky part: above code might need to be tweaked for your printer.

I used this source to instruct a client to get this working.


The cupsFilter I see here in a random /etc/cups/ppd/*.ppd:

*NickName:      "Generic PDF file generator"
*1284DeviceID:  "MFG:Generic;MDL:PDF file generator;DES:Generic PDF file generator;CLS:PRINTE
R;CMD:POSTSCRIPT;"
*% cupsFilter:    "application/vnd.cups-postscript 0 pstitleiconv"
*PSVersion:     "(2017.000) 0"
*LanguageLevel: "2"
*ColorDevice:   True
*DefaultColorSpace: RGB
*FileSystem:    False
  • Ok, I see I have to adapt the last file to my needs, as SET KM??? stands for KonicaMinolta .... my printer certainly uses stgh. different. Will try to grab that from a Windows Print to file. However, where about to put *cupsFilter: "application/vnd.cups-raw 0 sharp1" as there is no such section in my PPD? – JohnDoe Jul 5 '13 at 13:09
  • I edited in an example snippet. Oh and it is not a section but a single line in the ppd. Probably need to add it in for your sharp ;) Yes the KM stands for KonicaMinolta so I expect you need your own set of params that the Sharp knows (I googled for them but alas but you will find them from Windows with the Print to File option so it should be possible ). When you find them I'll add them into the answer ;) ) – Rinzwind Jul 5 '13 at 14:36
  • I will try your suggestions once I am back at the office and will report back. – JohnDoe Jul 6 '13 at 9:37
  • Ok, I got it working. My {Printer}.conf - file only contains the single required line ACCOUNTNUMBER="01234" (replace 01234 with your account number) and I added a filter in /usr/lib/cups/filter/sharp-addaccount, replacing the information you gave above with the relevant line: echo -en "@PJL SET ACCOUNTNUMBER = \"${ACCOUNTNUMBER}\"\015\012"` – JohnDoe Jul 8 '13 at 13:45
  • gratz! lets see if I understood it. EDIT: like so? – Rinzwind Jul 8 '13 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.