pdfInsertBMPFromHandle
Insert a live GDI HBITMAP handle directly as an image,
int32_t __stdcall pdfInsertBMPFromHandle(PPDF IPDF, double PosX, double PosY, double ScaleWidth, double ScaleHeight, void* Handle);
function pdfInsertBMPFromHandle(const IPDF: PPDF; PosX, PosY, ScaleWidth, ScaleHeight: Double; Handle: Pointer): Integer; stdcall;
Purpose. Insert a live GDI HBITMAP handle directly as an image, converting it to BMP bytes in-process (ViewerHBitmapToBMP) before routing through the same InsertBufferImage path used by pdfInsertImageFromBuffer (Image Insertion and Replacement) — the bitmap counterpart of pdfInsertMetafileFromHandle (Metafile Insertion (EMF/WMF)).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
PosX, PosY, ScaleWidth, ScaleHeight | Placement box. |
Handle | A live GDI HBITMAP (Windows-only; caller retains ownership). |
Return value. The new image handle; 0 if the conversion failed or IPDF is invalid.
See also. pdfInsertImageFromBuffer.
C# (P/Invoke)
public static extern int pdfInsertBMPFromHandle(IntPtr IPDF, double PosX, double PosY, double ScaleWidth, double ScaleHeight, IntPtr Handle);
Core
pdfInsertBMPFromHandle
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.