[Desktop_printing] Multi-Language PPD files and PPD file specs

Johannes Meixner jsmeix at suse.de
Wed Jan 18 07:30:11 PST 2006


Hello,

On Jan 18 08:17 Michael Sweet wrote (shortened):
> Johannes Meixner wrote:
> > On Jan 17 13:09 Michael Sweet wrote (shortened):
> > > http://svn.easysw.com/public/cups/trunk/doc/help/spec-ppd.html
> > 
> > In the "Custom PostScript gamma/density option" example ...
> 
> PostScript commands will get the parameters added before the
> code, for example a custom GammaDensity={Gamma=1.2 Density=0.6}
> would get mapped to the following PostScript code:
> 
>     1.2 0.6
>     <</cupsReal1 3 1 roll/cupsReal2 3 1>>setpagedevice

To make sure that I understand it correctly:


Results
-------------------------------------------------------
*CustomFoo True: "PostScript code snippet"
*ParamCustomFoo Bar: 2 int -10 10
*ParamCustomFoo Baz: 1 string 1 10000
-------------------------------------------------------
exactly the same as
-------------------------------------------------------
*CustomFoo True: "\1
\2
PostScript code snippet"
*End
*ParamCustomFoo Bar: 2 int -10 10
*ParamCustomFoo Baz: 1 string 1 10000
-------------------------------------------------------
so that with values "-9" for Bar and "Some Text" for Baz
both result the following PostScript code:
-------------------------------------------------------
Some Text
-9
PostScript code snippet
-------------------------------------------------------

Is the ordering on the PostScript stack determined by the
values for "order" in the PPD file and not by the ordering
of the "Param..." lines in the PPD file?


If
-------------------------------------------------------
*CustomFoo True: "\1 \2 PostScript code snippet"
*End
*ParamCustomFoo Bar: 2 int -10 10
*ParamCustomFoo Baz: 1 string 1 10000
-------------------------------------------------------
was specified in the PPD and if the value for Baz is a string
with 10000 characters, could this lead to some string buffer
overflow (e.g. in pstops) or to a too long line in the PostScript
code?


Is it possible to test for allowed characters in strings?
Or could it happen that any string can be inserted in the
PostScript code?
(E.g. "{ } loop" to keep any PostScript interpreter busy.)


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/



More information about the Printing-summit mailing list