Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 226

Previous Page 225   Index   Next Page 227

Function Reference
Page 226 of 750
combination. The definition of the spot colorants is optional but strongly recommended because it is
the only way to render a spot colorant alone. Note that the Output Preview in Adobe's Acrobat
depends on properly defined spot colorants.
Process colorant attributes
If a DeviceN color space contains components of a process color space then it should include
information about the color space in which these components are defined. This can be done with the
function AddDeviceNProcessColorants() which accepts an array of colorant names and the
underlying process color space. The process color space can be any device or CIE based color space.
If an ICCBased color space is specified, it must provide calibration information appropriate for the
process color components specified in the names array of the DeviceN color space.
The array of colorant names must correspond, in order, to the components of the process color space.
For example, an RGB color space must have three names corresponding to red, green, and blue. The
names may be arbitrary (that is, not the same as the standard names for the color space components)
but must match those specified in the DeviceN color space, even if not all components are present in
the DeviceN color space.
The defintion of process colorants of a DeviceCMYK color space is optional since the colorant names
Cyan, Magenta, Yellow, and Black are always considered as color components of a DeviceCMYK
color space.
How to create the PostScript Calculator Function?
A PostScript calculator function is represented as a string containing code written in a small subset of
the PostScript language. The language that can be used in a PostScript calculator function contains
expressions involving integers, real numbers, and boolean values only. There are no composite data
structures such as strings or arrays, no procedures, and no variables or names.
The following operators are supported in a PostScript calculator function:
Operator type
Operators
Arithmetic operators
abs
cvi
floor
mod
sin
add
cvr
idiv
mul
sqrt
atan
div
ln
neg
sub
ceiling
exp
log
round
truncate
cos
Relational, boolean,
and
false
le
not
true
and bitwise operators
bitshift
ge
lt
or
xor
eq
gt
ne
Conditional operators
if
ifelse
Stack operators
copy
exch
pop
dup
index
roll
 

Previous topic: Spot colorant attributes

Next topic: Example 1: