THotPDF.CreateIndirectFontDict Método

 

THotPDF.CreateIndirectFontDict

THotPDF

 

Arriba

Asigna un THPDFDictionaryObject vacío y nuevo registrado como objeto PDF indirecto en la tabla IndirectObjects del documento. Los llamadores que construyen dicts personalizados de fuente / color / OCG / Function que deben serializarse como referencias indirectas "N G R" rellenan el dict devuelto y lo pasan por cualquier API que acepte un THPDFDictionaryObject existente. Esta es la forma de API pública del helper protegido histórico CreateIndirectDictionary

 

Sintaxis Delphi:

function CreateIndirectFontDict: THPDFDictionaryObject;

 

Sintaxis C++:

THPDFDictionaryObject* CreateIndirectFontDict();

 

Descripción

El dict devuelto empieza vacío (sin entradas). El llamador agrega entradas mediante AddNameValue, AddStringValue, AddNumericValue, AddValue, etc. El dict pertenece al documento; no lo libere manualmente. Aunque el método se llama "FontDict" por su uso principal previsto con SetFormUnicodeFontDict, el dict devuelto no tiene semántica específica de fuente: puede contener cualquier contenido de diccionario PDF que necesite el llamador

 

Valor devuelto: an empty indirect THPDFDictionaryObject.

 

Ejemplo de código

// Build a minimal Type 0 / CIDFontType2 + Identity-H font dict for
// AcroForm Tx widget AP rendering
var
  F0: THPDFDictionaryObject;
begin
  HPDF.BeginDoc;
  F0 := HPDF.CreateIndirectFontDict;
  F0.AddNameValue('Type', 'Font');
  F0.AddNameValue('Subtype', 'Type0');
  F0.AddNameValue('BaseFont', 'MyCJK');
  F0.AddNameValue('Encoding', 'Identity-H');
  // ... fill DescendantFonts / CIDSystemInfo / FontDescriptor /
  HPDF.SetFormUnicodeFontDict('F0', F0);
  HPDF.EndDoc;
end;

 

Véase también

SetFormUnicodeFontDict