BOOL32 __stdcall pdfCloseImage(PPDF IPDF);
function pdfCloseImage(const IPDF: PPDF): LongBool; stdcall;
Purpose. Close/clear the staged image slot left by pdfCreateImage (Image Insertion and Replacement) — the handle of the most recently created-but-not-yet-placed image.
Description. CloseStagedImage reports success (True) only if a staged image handle was actually pending (FStagedImage > 0), then resets FStagedImage to 0 regardless. This does not delete the image entry itself from FImages — same "no delete API exists" caveat as pdfFreeImageObj above — it only clears the bookkeeping slot that tracks "the most recently staged-but-unplaced" image; the image remains fully usable via its handle (e.g. through pdfPlaceImage) after this call.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Return value. True if a staged image was pending and its slot was cleared; False if nothing was staged (e.g. pdfCloseImage called twice in a row, or no pdfCreateImage call preceded it).
See also. pdfCreateImage.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfCloseImage
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.