Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

DynaPDF.AddDeviceNSeparations

Adds DeviceN separations.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 7.4 Yes Yes Yes Yes Yes

MBS( "DynaPDF.AddDeviceNSeparations"; PDF; DeviceNCS; Colorants; SeparationCS; NumColorants )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
DeviceNCS Handle of a DeviceN or NChannel color space.
Colorants Array of colorant names.
SeparationCS Array of Separation color space handles.
NumColorants Number of colorants and handles in the arrays.

Result

Returns OK or error.

Description

Adds DeviceN separations.
Adds a dictionary to a DeviceN or NChannel color space that describes the spot colorants which are used in the color space.
This dictionary provides information about the individual colorants that may be useful to some applications. In particular, the alternate color space and tint transformation function of a Separation color space describe the appearance of that colorant alone, whereas those of a DeviceN color space describe only the appearance of its colorants in combination.
The array Colorants holds the spot colorant names and the array SeparationCS holds the corresponding Separation color space handles. The colorant names in the array must match the names in the corresponding Separation color spaces. In addition, the colorants must be included in the DeviceN or NChannel color space.
If NumColorants is zero the functions deletes existing definitions of spot colorants in the DeviceN or NChannel color space. Otherwise, existing definitions will be overridden.

See also AddDeviceNSeparations function in DynaPDF manual.

Examples

Create separation color space with spotcolor and use it:

# Create the DeviceN color space
# Create Blend function (see dynapdf_help.pdf for how this was created)
Set Variable [ $PostScriptFunc ; Value: "{2 index 0.38 mul 2 index 0 add add 0 3 index 0.56 mul 0 add add 4 index 0.34 mul 0 4 index add add 0 0 0 add add 7 4 roll pop pop pop}" ]
Set Variable [ $cls ; Value: "PANTONE 345 CVC¶PANTONE 293 CVC¶Yellow" ]
Set Variable [ $cs ; Value: MBS("DynaPDF.CreateDeviceNColorSpace"; $pdf; $cls; 3; $PostScriptFunc; "DeviceCMYK"; -1) ]

# We create also Separation color spaces for the spot colors and add
# these color spaces as an attribute to the DeviceN color space:
# First spot color
Set Variable [ $separations0 ; Value: MBS("DynaPDF.CreateSeparationCS"; $pdf; Trim(GetValue ( $cls; 1 )); "DeviceCMYK"; -1; MBS("DynaPDF.CMYK"; 97; 0; 87; 0)) ]
# Second spot color
Set Variable [ $separations1 ; Value: MBS("DynaPDF.CreateSeparationCS"; $pdf; Trim(GetValue ( $cls; 2 )); "DeviceCMYK"; -1; MBS("DynaPDF.CMYK"; 255; 143; 0; 0)) ]
# Put in a list:
Set Variable [ $separations ; Value: $separations0 & ¶ & $separations1 ]
# Add the separation color spaces to the DeviceN color space.
Set Variable [ $r ; Value: MBS("DynaPDF.AddDeviceNSeparations"; $pdf; $cs; $cls; $separations; 2) ]
# Because the DeviceN color space uses a process color we add also
# the attributes of the process color space to it. Note that all
# colorant names must be defined, also if the DeviceN color space
# uses only one component of the process color space.
Set Variable [ $pcs ; Value: "Cyan¶Magenta¶Yellow¶Black" ]
Set Variable [ $r ; Value: MBS("DynaPDF.AddDeviceNProcessColorants"; $pdf; $cs; $pcs; 4; "DeviceCMYK"; -1) ]
# The DeviceN color space is now fully created so that we can use it
# Set the DeviceN color space
Set Variable [ $r ; Value: MBS("DynaPDF.SetExtColorSpace"; $pdf; $cs) ]
# Draw a rectangle with this color
Set Variable [ $r ; Value: MBS("DynaPDF.SetFillColor"; $pdf; 150/255; 100/255; 100/255) ]
Set Variable [ $r ; Value: MBS("DynaPDF.Rectangle"; $pdf; 50; 690; 200; 100; "fill") ]

See also

Example Databases


DynaPDF.AddDeviceNProcessColorants   -   DynaPDF.AddFontSearchPath

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins