THPDFDocOutlineObject.Color / Bold / Italic

THPDFDocOutlineObject

 

OutlineRoot

Styles the outline panel rendering of a bookmark item using the PDF /C (color) and /F (bold / italic flags) outline dictionary entries (ISO 32000-1 §12.3.3 Table 153). Use these to highlight chapters, mark sections awaiting review, or match brand colors.

 

Delphi syntax:

property Color: TColor;

property Bold: Boolean;

property Italic: Boolean;

 

Description

Color writes the PDF /C [r g b] array. TColor channels are decoded to floating-point components in the [0..1] range expected by the spec. Vcl.Graphics.clNone (the default) suppresses emission – older callers see byte-identical output. Setting Color back to clNone at any time removes the entry from the outline dictionary.

Bold and Italic compose the PDF /F bit-flag (bit 1 = italic, bit 2 = bold). The entry is emitted only when at least one flag is true. Setting both back to false removes the entry.

Setters mutate the live outline dictionary in place, so the order of AddChild followed by property assignment is fine.

 

Example

var
  Item: THPDFDocOutlineObject;
begin
  Item := PDF.OutlineRoot.AddChild('Chapter 1');
  Item.Bold := True;
  Item.Color := clNavy;
end;

 

Availability

HotPDF v2.119.15. PDF 1.4+ feature; the entries are ignored gracefully by PDF 1.3 viewers.

 

See also: THPDFDocOutlineObject, AddChild, Opened