API referencePDF/A & Conformance

pdfAddRasImage

Place an IRAS rasterizer's already-rendered RGB buffer

C
BOOL32 __stdcall pdfAddRasImage(PPDF IPDF, IRAS RasPtr, TCompressionFilter Filter);
Delphi
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.

ParameterDescription
IPDFDocument handle.
RasPtrSource rasterizer; must have a valid, non-empty buffer.
FilterAccepted; 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)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
PDF/A & Conformance
Category

Content Creation

Exported names

pdfAddRasImage

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.