API referenceCore SDK

pdfEditTemplate2

Reopen an existing native (previously-drawn) template for

C
BOOL32 __stdcall pdfEditTemplate(PPDF IPDF, uint32_t Index);
BOOL32 __stdcall pdfEditTemplate2(PPDF IPDF, uint32_t Handle);
BOOL32 __stdcall pdfEndTemplate(PPDF IPDF);
Delphi
function pdfEditTemplate(const IPDF: PPDF; Index: Cardinal): LongBool; stdcall;
function pdfEditTemplate2(const IPDF: PPDF; Handle: Cardinal): LongBool; stdcall;
function pdfEndTemplate(const IPDF: PPDF): LongBool; stdcall;

Purpose. Reopen an existing native (previously-drawn) template for further content capture — pdfEditTemplate addresses it by 0-based index, pdfEditTemplate2 by handle (see the chapter-level addressing note).

Description. pdfEndTemplate is, per Patterns, Shadings, ExtGState Creation, and Template Placement, the literal same EndCapture function used to close a pattern capture (pdfEndPattern) — either name correctly ends whichever kind of capture is currently open.

Parameters.

ParameterDescription
IPDFDocument handle.
Index*(EditTemplate)* 0-based template index.
Handle*(EditTemplate2)* Template handle.

Return value. True on success; False if the target doesn't resolve (only a native, drawn template can be reopened — not one that wraps imported/foreign content).

See also. pdfEndPattern.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Core

Exported names

pdfEditTemplate2

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.