command returning a value of option

Jiří Tempír jiri.tempir at kleibl.cz
Fri Jun 1 03:38:56 PDT 2012


>   This message is in MIME format.  The first part should be readable text,
>   while the remaining parts are likely unreadable without MIME-aware tools.
>
> --168428555-66602418-1338294985=:23341
> Content-Type: TEXT/PLAIN; format=flowed; charset=ISO-8859-15
> Content-Transfer-Encoding: 8BIT
>
>
> Hello,
>
> On May 29 04:49 Ji?� Temp�r wrote (excerpt):
> > Is it possible to execute a command inserted in PPD file?
> > In PPD http://www.openprinting.org/ppd-o-matic.php?driver=Postscript-Ricoh&printer=Ricoh-Aficio_MP_C3001&show=1
>
> When it is a Foomatic PPD file you may enhance the
> FoomaticRIPCommandLine as you need.
> Example for the PPD above:
> -----------------------------------------------------------------
> *FoomaticRIPCommandLine: "printf "%%!PS-Adobe-3.0\n&&
> %%%% %%%%\n%A%B%C%D"%%%%;&&
> /path/to/your/command;"
> *End
> -----------------------------------------------------------------
> /path/to/your/command is an executable that reads from stdin,
> modifies the PostScript as you need, and outputs at stdout.
>
> In general you may have a look at
> http://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS
> in particular the sections regarding
> "Adding Additional Filter Stages to the Default CUPS Filter System"
>
>
> Kind Regards
> Johannes Meixner
> --
> SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
> HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
> --168428555-66602418-1338294985=:23341--
>

Hi Johannes,
Thank you for your answer.

I have read the article recommended by you.
I have tied to put my script into FoomaticRIPCommandLine bat the command is executed at the beginning of making a job, before making a head and I need to modify a job head.
UserCode is placed in the head of job.

ESC%-12345X at PJL SET COPIES=1
@PJL SET DATAMODE=COLOR
@PJL SET RESOLUTION=600
@PJL SET BITSPERPIXEL=2
@PJL SET ECONOMODE=OFF
@PJL SET DUPLEX=OFF
@PJL SET MEDIATYPE=PLAIN
@PJL SET OUTBIN=SYSDEFAULT
@PJL SET STAPLE=OFF
@PJL SET PUNCH=OFF
@PJL SET USERCODE="11119999"
@PJL SET RENDERMODE=COLOR
@PJL ENTER LANGUAGE = PCLXL
...

%!PS-Adobe-3.0
%% %%
mark
() (11119999) (201204271200) {setuserinfo} stopped
cleartomark
%%%!PS-Adobe-3.0
%%LanguageLevel: 3
%%DocumentSuppliedResources: (atend)
%%DocumentMedia: plain 595 842 0 () ()
%%For: (jitempir)
%%Title: (test_tisk_ricoh)
%RBINumCopies: 1
%%Pages: (atend)
%%BoundingBox: (atend)
%%EndComments
%%BeginProlog
%%BeginDefaults
%%PageMedia: plain
%%EndDefaults
%%BeginProlog
%%BeginResource: procset xpdf 3.00 0
...


Do you have any idea who to do it?





More information about the cups mailing list