API referencePDF/A & Conformance

pdfAutoTemplate

Register an already-created template ([Templates, Content Capture, and Soft Masks](../V03_CoreSDK/E19_TemplatesCaptureAndSoftMasks.md)) to be

C
BOOL32 __stdcall pdfAutoTemplate(PPDF IPDF, uint32_t Templ, double PosX, double PosY, double Width, double Height);
Delphi
function pdfAutoTemplate(const IPDF: PPDF; Templ: Cardinal; PosX, PosY, Width, Height: Double): LongBool; stdcall;

Purpose. Register an already-created template (Templates, Content Capture, and Soft Masks) to be automatically placed at a fixed position/size — a "stamp this template here on every applicable page" registration, distinct from pdfPlaceTemplate's one-shot explicit placement.

Description. Validates Templ resolves to a real, non-deleted template before registering the auto-placement entry (FAutoTmplHandle/X/Y/W/H parallel arrays). This chapter did not trace the exact trigger point (every new page? only pages created after registration? all pages retroactively?) where the auto-template placement is actually applied during serialization.

Parameters.

ParameterDescription
IPDFDocument handle.
TemplAn existing template handle.
PosX, PosY, Width, HeightFixed placement rectangle applied automatically.

Return value. True if Templ resolves to a real template.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
PDF/A & Conformance
Category

Core

Exported names

pdfAutoTemplate

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.