THotPDF.RegisterSeparation 메서드

 

THotPDF.RegisterSeparation

THotPDF

 

맨 위

Spot-color print workflow를 위한 PDF 1.3+ Separation color space(ISO 32000-1 8.6.6.4)를 선언합니다. 각 호출은 spot ink 하나를 등록하고 THPDFPage.SetFillColorSpace / SetStrokeColorSpace + SetFillColor([tint]) / SetStrokeColor([tint])와 함께 사용할 수 있는 auto-generated color-space name(Sep1, Sep2, ...)을 반환합니다

 

Delphi 구문:

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

 

C++ 구문:

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

 

설명

Separation color space를 사용하면 PDF가 spot ink(예: Pantone color)를 이름으로 참조할 수 있습니다. Conforming print device는 실제 ink를 사용합니다. On-screen viewer와 digital previewer는 tint = 1.0에서 제공된 AlternateCS color로 fallback하고, tint = 0의 "no ink" 방향으로 linear interpolation합니다

 

ColorantName - ink name입니다. 예: 'Pantone 185 C'. PDF 1.7 7.3.5에 따라 output PDF name에서 space는 #20으로 escape됩니다. 다른 PDF delimiter character(parentheses, brackets, slashes, percent signs)는 피해야 합니다

AlternateCS - 'DeviceGray' (1 component), 'DeviceRGB' (3), or 'DeviceCMYK' (4). Any other value raises an exception.

TintC1 - full ink strength(tint = 1.0)에서의 alternate-CS component입니다. Component count는 AlternateCS와 일치해야 하며 값은 [0..1] 범위입니다. DeviceGray에서는 convention이 0 = black, 1 = white임에 유의하십시오(image BlackIs1 default와 반대)

 

반환 값: auto-generated name(Sep1, Sep2, ...)입니다. StrictVersionLock이 켜져 있고 active Version이 PDF 1.3보다 낮으면 빈 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;

 

See Also

RegisterDeviceN, RegisterLabColorSpace, Version, PDF Filter Support