Action Graph Inspection and GoToE Navigation
THPDFActionBuilder creates PDF 1.6 GoToE actions for destinations inside embedded or related PDF documents, while the loaded-action API reads all 18 standard PDF action subtypes without executing them
GoToE builders
class function GoToEmbeddedNamedDestination(
const RootFileName, DestinationName: AnsiString;
const TargetPath: array of THPDFEmbeddedTarget;
NewWindow: boolean = false): THPDFActionBuilder;
class function GoToEmbeddedPage(
const RootFileName: AnsiString;
TargetPageIndex: Integer;
const TargetPath: array of THPDFEmbeddedTarget;
FitMode: THPDFDestinationFitMode = dfmFit;
Left: Single = 0; Top: Single = 0;
Right: Single = 0; Bottom: Single = 0;
Zoom: Single = 0; NewWindow: boolean = false): THPDFActionBuilder;
Build each target path entry with HPDFEmbeddedParentTarget, HPDFEmbeddedFileTarget, or an HPDFEmbeddedAnnotationTarget overload
A child selected through the EmbeddedFiles name tree writes /R /C plus /N, while an attachment-annotation child writes /R /C plus the required /P and /A pair
Parent entries write only /R /P, nested entries become recursive /T dictionaries, and an empty RootFileName requires a non-empty target path
Delphi example
var
Action: THPDFActionBuilder;
Targets: THPDFEmbeddedTargetArray;
begin
SetLength(Targets, 2);
Targets[0] := HPDFEmbeddedFileTarget('chapter.pdf');
Targets[1] := HPDFEmbeddedParentTarget;
Action := THPDFActionBuilder.GoToEmbeddedNamedDestination(
'containers\root.pdf', 'EmbeddedStart', Targets, True);
try
HotPDF.CurrentPage.SetAnnotationAction(Annot, Action);
finally
Action.Free;
end;
end;
Loaded action graph
function GetLoadedActionChain(ActionObject: THPDFObject): THPDFLoadedActionInfoArray;
function GetLoadedOpenActionChain: THPDFLoadedActionInfoArray;
function GetLoadedDocumentActionChain(ActionType: THPDFActionScriptType): THPDFLoadedActionInfoArray;
function GetLoadedPageActionChain(PageIndex: Integer; Trigger: THPDFPageActionTrigger): THPDFLoadedActionInfoArray;
function GetLoadedAnnotationPrimaryActionChain(PageIndex, AnnotationIndex: Integer): THPDFLoadedActionInfoArray;
function GetLoadedAnnotationActionChain(PageIndex, AnnotationIndex: Integer; Trigger: THPDFAnnotationActionTrigger): THPDFLoadedActionInfoArray;
function GetLoadedFormFieldActionChain(FieldIndex: Integer; Trigger: THPDFFormFieldActionTrigger): THPDFLoadedActionInfoArray;
function GetLoadedOutlineActionChain(OutlineIndex: Integer): THPDFLoadedActionInfoArray;
The returned array follows execution order: the parent action appears first, followed by each /Next dictionary or array member in ordered depth-first sequence
THPDFLoadedActionInfo.Kind identifies GoTo, GoToR, GoToE, Launch, Thread, URI, Sound, Movie, Hide, Named, SubmitForm, ResetForm, ImportData, JavaScript, SetOCGState, Rendition, Trans, or GoTo3DView
Core operands are decoded into destination, file, URI, JavaScript, target, operation, flag, volume, optional-boolean, and related-object fields
NewWindow uses obAbsent, obFalse, or obTrue so a missing value remains distinct from an explicit false value
The reader never executes an action and never follows an unbounded graph
Malformed entries, cycles, repeated shared nodes, depth over 64, node count over 4096, and oversized /Next arrays return diagnostic records through Malformed and Issue
Annotation visibility triggers
THPDFAnnotationActionTrigger and THPDFAnnotationJavaScriptTrigger include page-open /PO, page-close /PC, page-visible /PV, and page-invisible /PI entries
These four triggers negotiate PDF 1.5, while the existing mouse and focus action triggers retain their earlier version requirements