THotPDF.RegisterSeparation Method

 

THotPDF.RegisterSeparation

THotPDF

 

先頭

PDF 1.3+ の Separation color space を spot-color print workflows 向けに宣言します (ISO 32000-1 8.6.6.4)。各 call は 1 つの spot ink を登録し、THPDFPage.SetFillColorSpace / SetStrokeColorSpace + SetFillColor([tint]) / SetStrokeColor([tint]) で使える auto-generated color-space name (Sep1Sep2、...) を返します

 

Delphi syntax:

function RegisterSeparation(const ColorantName: AnsiString; const AlternateCS: AnsiString; const TintC1: array of Extended): AnsiString;

 

C++ syntax:

AnsiString RegisterSeparation(const AnsiString& ColorantName, const AnsiString& AlternateCS, const Extended* TintC1, int TintC1Count);

 

説明

Separation color space により、PDF は spot ink (例: Pantone color) を name で参照できます。conforming print devices は実際の ink を使用し、on-screen viewers と digital previewers は tint = 1.0 で supplied AlternateCS color に fallback し、tint = 0 の「no ink」へ linear interpolation します

 

ColorantName - ink name です。例: 'Pantone 185 C'。spaces は PDF 1.7 7.3.5 に従い output PDF name で #20 に escape されます。その他の PDF delimiter characters (parentheses、brackets、slashes、percent signs) は避けてください

AlternateCS - 'DeviceGray' (1 component)、'DeviceRGB' (3)、または 'DeviceCMYK' (4) です。それ以外の値は exception を発生させます

TintC1 - full ink strength (tint = 1.0) での alternate-CS components です。component count は AlternateCS と一致しなければならず、values は [0..1] です。DeviceGray では convention が 0 = black、1 = white である点に注意してください (image BlackIs1 default とは逆です)

 

戻り値: auto-generated name (Sep1Sep2、...) です。StrictVersionLock が on で active Version が PDF 1.3 未満の場合は empty string を返します (それ以外では document version は 1.3 に auto-bump されます)

 

Code Example

// Register a Pantone-style spot ink backed by CMYK, paint four tint
// swatches showing the linear progression from no ink to full ink
var
  SpotName: AnsiString;
  T: Integer;
begin
  HPDF.Version := pdf14;
  HPDF.BeginDoc;
  SpotName := HPDF.RegisterSeparation(
    'Pantone 185 C',                 // ink name (spaces auto-escaped)
    'DeviceCMYK',                    // alternate CS for screen / digital
    [0.0, 0.95, 0.75, 0.0]);         // CMYK at tint = 1.0
  HPDF.CurrentPage.SetFillColorSpace(SpotName);
  for T := 1 to 4 do
  begin
    HPDF.CurrentPage.SetFillColor([T * 0.25]);
    HPDF.CurrentPage.Rectangle(60 + (T - 1) * 100, 100, 80, 60);
    HPDF.CurrentPage.Fill;
  end;
  HPDF.EndDoc;
end;

 

関連項目

RegisterDeviceN, RegisterLabColorSpace, Version, PDF Filter Support