API referenceCore SDK

pdfCreateGoToEAction

Create a "go to embedded" action that opens a PDF embedded

Exported namespdfCreateGoToEActionA, pdfCreateGoToEActionW

Purpose — Create a "go to embedded" action that opens a PDF embedded inside this document (or a related container) and jumps to a page or named destination in it.

Description — Registers action kind 11 with GotoPg=DestPage, a=NewWindow flag, and Text=Target (the embedded target's identifying name). When DestName is non-empty it is stored separately via SetActionDestNameH, exactly as for GoToR — the target-page destination and the named destination are independent; supplying both is valid, with the named destination taking precedence at the viewer's discretion per the PDF spec. Location/Source/SrcPage describe where the embedded file's related association starts the traversal (see TEmbFileLocation); they are accepted per the reference ABI shape but this engine's serializer does not further branch on Location/Source/SrcPage beyond passing Target/DestPage — do not rely on those three for anything beyond documentation intent.

Declarations

C
int32_t __stdcall pdfCreateGoToEActionA(PPDF IPDF, TEmbFileLocation Location, const char* Source, uint32_t SrcPage, const char* Target, const char* DestName, uint32_t DestPage, BOOL32 NewWindow);
int32_t __stdcall pdfCreateGoToEActionW(PPDF IPDF, TEmbFileLocation Location, const wchar_t* Source, uint32_t SrcPage, const wchar_t* Target, const wchar_t* DestName, uint32_t DestPage, BOOL32 NewWindow);
Delphi
function pdfCreateGoToEActionA(const IPDF: PPDF; Location: TEmbFileLocation; const Source: PAnsiChar; SrcPage: Cardinal; const Target, DestName: PAnsiChar; DestPage: Cardinal; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';
function pdfCreateGoToEActionW(const IPDF: PPDF; Location: TEmbFileLocation; const Source: PWideChar; SrcPage: Cardinal; const Target, DestName: PWideChar; DestPage: Cardinal; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';

TEmbFileLocation:

Delphi
TEmbFileLocation = (eflChild, eflChildAnnot, eflExternal,
                     eflExternalAnnot, eflParent, eflParentAnnot);

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
LocationTEmbFileLocationRelationship of the embedded target to this document (accepted, not further branched — see Description).
SourcestringSource-side identifying name (accepted, not further branched).
SrcPageCardinalSource-side page (accepted, not further branched).
TargetstringEmbedded target identifying name — stored and serialized.
DestNamestringNamed destination inside the target, or empty to use DestPage.
DestPageCardinalTarget page inside the embedded file.
NewWindowBOOL32New-window hint — stored and serialized.

Return value — 1-based action handle (> 0), or 0 on an invalid handle.

See alsopdfCreateGoToRAction

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateGoToEActionA(IntPtr IPDF, TEmbFileLocation Location, [MarshalAs(UnmanagedType.LPStr)] string Source, uint SrcPage, [MarshalAs(UnmanagedType.LPStr)] string Target, [MarshalAs(UnmanagedType.LPStr)] string DestName, uint DestPage, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
public static extern int pdfCreateGoToEActionW(IntPtr IPDF, TEmbFileLocation Location, [MarshalAs(UnmanagedType.LPWStr)] string Source, uint SrcPage, [MarshalAs(UnmanagedType.LPWStr)] string Target, [MarshalAs(UnmanagedType.LPWStr)] string DestName, uint DestPage, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateGoToEActionA pdfCreateGoToEActionW

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.