THotPDF.RegisterSeparation Method

 

THotPDF.RegisterSeparation

THotPDF

 

الأعلى

يعلن Separation colour space في PDF 1.3+ لمسارات spot-colour print (ISO 32000-1 8.6.6.4). يسجل كل استدعاء حبر spot واحدًا ويعيد اسم colour-space مولدًا تلقائيًا مثل Sep1 أو Sep2 لاستخدامه مع THPDFPage.SetFillColorSpace / SetStrokeColorSpace + SetFillColor([tint]) / SetStrokeColor([tint])

 

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 colour space لـ PDF الإشارة إلى حبر spot بالاسم. تستخدم أجهزة الطباعة المتوافقة الحبر الفعلي؛ أما العارضات على الشاشة والمعاينات الرقمية فتعود إلى لون AlternateCS عند tint = 1.0 مع استيفاء خطي نحو no ink عند tint = 0

 

ColorantName - اسم الحبر، مثل 'Pantone 185 C'. تهرب المسافات إلى #20 في اسم PDF الناتج وفق PDF 1.7 7.3.5؛ وينبغي تجنب delimiter characters الأخرى في PDF

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

TintC1 - مكونات alternate-CS عند قوة الحبر الكاملة (tint = 1.0). يجب أن يطابق عدد المكونات AlternateCS؛ والقيم ضمن [0..1]. لاحظ أن convention في DeviceGray هو 0 = black و1 = white

 

القيمة المعادة: اسم مولد تلقائيًا (Sep1, Sep2, ...). يعيد سلسلة فارغة عندما يكون StrictVersionLock مفعّلًا وVersion النشطة أقل من PDF 1.3؛ وإلا يرفع إصدار المستند تلقائيًا إلى 1.3

 

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