API reference › PDF/A & Conformance
pdfAddRasImage
Place an IRAS rasterizer's already-rendered RGB buffer
BOOL32 __stdcall pdfAddRasImage(PPDF IPDF, IRAS RasPtr, TCompressionFilter Filter);
function pdfAddRasImage(const IPDF: PPDF; RasPtr: IRAS; Filter: TCompressionFilter): LongBool; stdcall;
Purpose. Place an IRAS rasterizer's already-rendered RGB buffer (Rasterizer and Page-Cache Lifecycle) onto the current page as a real embedded image — a render-to-image bridge, useful for e.g. flattening a rendered preview back into a new PDF page.
Description. Fully implemented — historically a False stub, now genuinely implemented (per an inline comment: "Was a False stub"): wraps the rasterizer's top-down RGB buffer as a proper bottom-up BGR 24-bit BMP byte stream (manual per-pixel channel swap + row-flip) and routes it through the normal image inserter (InsertBufferImage). Filter is accepted by the ABI but this chapter did not find it passed through to the BMP-wrapping/insert path — the inserted image's actual compression is determined by the normal image-insertion pipeline's own defaults, not necessarily this parameter.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
RasPtr | Source rasterizer; must have a valid, non-empty buffer. |
Filter | Accepted; not confirmed to reach the actual image-insertion compression choice. |
Return value. True on success; False if RasPtr doesn't resolve to a rendered buffer.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Content Creation
pdfAddRasImage
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.