API reference › PDF/A & Conformance
pdfAutoTemplate
Register an already-created template ([Templates, Content Capture, and Soft Masks](../V03_CoreSDK/E19_TemplatesCaptureAndSoftMasks.md)) to be
BOOL32 __stdcall pdfAutoTemplate(PPDF IPDF, uint32_t Templ, double PosX, double PosY, double Width, double Height);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Templ | An existing template handle. |
PosX, PosY, Width, Height | Fixed placement rectangle applied automatically. |
Return value. True if Templ resolves to a real template.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfAutoTemplate
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.