API referenceCore SDK

pdfCreateURIAction

Create an action that opens a URI (typically a web link).

Exported namespdfCreateURIAction (bare = ANSI)

Purpose — Create an action that opens a URI (typically a web link).

Description — Registers action kind 3 with URL in Text.

Declarations

C
int32_t __stdcall pdfCreateURIAction(PPDF IPDF, const char* URL);
Delphi
function pdfCreateURIAction(const IPDF: PPDF; const URL: PAnsiChar): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
URLPAnsiCharTarget URI (ANSI only — there is no W variant).

Return value — 1-based action handle (> 0), or 0 on an invalid handle. The URL is not validated or escaped.

Remarks — For a URL destined for a link annotation specifically, see pdfChangeLinkAnnot, which sets a URL directly on an existing link rather than via an action handle.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateURIAction(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string URL);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateURIAction

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.