API referenceCore SDK

pdfPlaceTemplateEx

Place a template at an explicit position/scale on the

C
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);
Delphi
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.

ParameterDescription
IPDFDocument handle.
TmplHandleTemplate handle.
PosX, PosY, ScaleWidth, ScaleHeightPlacement 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)

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

Core

Exported names

pdfPlaceTemplateEx

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.