THotPDF.RegisterSeparation Method

 

THotPDF.RegisterSeparation

THotPDF

 

למעלה

מצהיר על Separation color space עבור תהליכי הדפסת spot-color ב-PDF 1.3+ ‏(ISO 32000-1 8.6.6.4). כל קריאה רושמת spot ink אחד ומחזירה שם color-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 color space מאפשר ל-PDF להפנות ל-spot ink, למשל צבע Pantone, לפי שם. התקני הדפסה תואמים משתמשים בדיו האמיתי; viewers על המסך וכלי preview דיגיטליים נופלים חזרה לצבע AlternateCS שסופק ב-tint = 1.0, עם אינטרפולציה ליניארית לכיוון “no ink” ב-tint = 0

 

ColorantName - שם הדיו, למשל 'Pantone 185 C'. רווחים עוברים escape ל-#20 בשם PDF שנפלט לפי PDF 1.7 7.3.5; יש להימנע מתווי delimiter אחרים של PDF, כגון סוגריים, brackets, slashes וסימני percent

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

TintC1 - רכיבי alternate-CS בעוצמת דיו מלאה (tint = 1.0). מספר הרכיבים חייב להתאים ל-AlternateCS; הערכים נמצאים ב-[0..1]. שים לב שב-DeviceGray המוסכמה היא 0 = black ו-1 = white, הפוך מברירת המחדל של image BlackIs1

 

הערך המוחזר: שם שנוצר אוטומטית, כגון 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;

 

See Also

RegisterDeviceN, RegisterLabColorSpace, Version, PDF Filter Support