Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.AddDeviceNSeparations
Adds DeviceN separations.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
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
- DynaPDF.AddDeviceNProcessColorants
- DynaPDF.CMYK
- DynaPDF.CreateDeviceNColorSpace
- DynaPDF.CreateSeparationCS
- DynaPDF.New
- DynaPDF.Rectangle
- DynaPDF.SetExtColorSpace
- DynaPDF.SetFillColor
Release notes
- Version 7.4
Example Databases
Blog Entries
This function checks for a license.
Created 27th August 2017, last changed 27th August 2017
DynaPDF.AddDeviceNProcessColorants - DynaPDF.AddFieldToFormAction