THotPDF.ExpandPDFNameHashEscapes

Unit: HPDFDoc

Declaration

function ExpandPDFNameHashEscapes(const Value: AnsiString): AnsiString;

Behavior

Expands the #XX escapes of ISO 32000-1 7.3.5 in a PDF name, one encoded byte per NUMBER SIGN plus two hexadecimal digits

ISO 16612-2:2010 §6.5 and §6.6 both state their XML NMTOKEN rule after expansion of the # escapes, so key comparison and the token test run on the expanded form and two spellings of one name cannot look distinct

An escape that ends prematurely or carries two non-hexadecimal characters raises an exception naming the offending value

Related APIs

THotPDF.AddPDFVTNode, THotPDF.PDFVTCompliance and THotPDF.SetPDFVTNodeNames