API referenceCore SDK

pdfDeleteTemplate

Remove a template — pdfDeleteTemplate by handle,

C
BOOL32 __stdcall pdfDeleteTemplate(PPDF IPDF, uint32_t Handle);
int32_t __stdcall pdfDeleteTemplateEx(PPDF IPDF, uint32_t Index);
Delphi
function pdfDeleteTemplate(const IPDF: PPDF; Handle: Cardinal): LongBool; stdcall;
function pdfDeleteTemplateEx(const IPDF: PPDF; Index: Cardinal): Integer; stdcall;

Purpose. Remove a template — pdfDeleteTemplate by handle, pdfDeleteTemplateEx by 0-based index (note: the naming here is the reverse convention from pdfEditTemplate/pdfEditTemplate2 — here the plain name is handle-based and the Ex name is index-based).

Return value. pdfDeleteTemplate: True on success. pdfDeleteTemplateEx: 1 on success, 0 otherwise.

C# (P/Invoke)

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

Core

Exported names

pdfDeleteTemplate

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.