BOOL32 __stdcall pdfPlaceTemplate(PPDF IPDF, int32_t TmplHandle, double PosX, double PosY, double ScaleWidth, double ScaleHeight);
BOOL32 __stdcall pdfPlaceTemplateEx(PPDF IPDF, int32_t TmplHandle, double PosX, double PosY, double ScaleWidth, double ScaleHeight);
function pdfPlaceTemplate(const IPDF: PPDF; TmplHandle: Integer; PosX, PosY, ScaleWidth, ScaleHeight: Double): LongBool; stdcall;
function pdfPlaceTemplateEx(const IPDF: PPDF; TmplHandle: Integer; PosX, PosY, ScaleWidth, ScaleHeight: Double): LongBool; stdcall;
Purpose. Place a template at an explicit position/scale on the current page (referenced from Patterns, Shadings, ExtGState Creation, and Template Placement as the explicit-position sibling of pdfPlaceTemplByMatrix).
Description. Verified: pdfPlaceTemplate and pdfPlaceTemplateEx are the literal identical implementation — both call the exact same D.PlaceTemplate(TmplHandle, PosX, PosY, ScaleWidth, ScaleHeight) with no difference whatsoever, despite having distinct ABI entry points and identical parameter lists. There is no reason to prefer one name over the other.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
TmplHandle | Template handle. |
PosX, PosY, ScaleWidth, ScaleHeight | Placement box; a <= 0 scale falls back to the template's natural BBox size. |
Return value. True on success; False if there is no open page or TmplHandle doesn't resolve.
See also. pdfPlaceTemplByMatrix.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfPlaceTemplate
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.