Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Adds DeviceN separations.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
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. |
Returns OK or error.
See also AddDeviceNSeparations function in DynaPDF manual.
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") ]
Created 27th August 2017, last changed 27th August 2017
DynaPDF.AddDeviceNProcessColorants - DynaPDF.AddFontSearchPath
Feedback: Report problem or ask question.