pdfInsertSVGEx
Parse and draw an SVG document onto the current page as real
BOOL32 __stdcall pdfInsertSVGA(PPDF IPDF, const char* FileName, double PosX, double PosY, double Width, double Height, int32_t Flags);
BOOL32 __stdcall pdfInsertSVGW(PPDF IPDF, const wchar_t* FileName, double PosX, double PosY, double Width, double Height, int32_t Flags);
BOOL32 __stdcall pdfInsertSVGEx(PPDF IPDF, void* Buffer, uint32_t BufSize, double PosX, double PosY, double Width, double Height, int32_t Flags);
function pdfInsertSVGA(const IPDF: PPDF; const FileName: PAnsiChar; PosX, PosY, Width, Height: Double; Flags: Integer): LongBool; stdcall;
function pdfInsertSVGW(const IPDF: PPDF; const FileName: PWideChar; PosX, PosY, Width, Height: Double; Flags: Integer): LongBool; stdcall;
function pdfInsertSVGEx(const IPDF: PPDF; Buffer: Pointer; BufSize: Cardinal; PosX, PosY, Width, Height: Double; Flags: Integer): LongBool; stdcall;
Purpose. Parse and draw an SVG document onto the current page as real PDF vector content — from a file (A/W) or an in-memory buffer (Ex).
Description. Flags is accepted by all three but never passed through to DrawSVG — same dropped-parameter pattern as pdfConvertEMFSpool above. All three ultimately call the identical DrawSVG with the raw SVG markup bytes; this chapter did not independently re-verify DrawSVG's own supported-SVG-feature subset (consult the engine DrawSVG directly for exact tag/attribute coverage before relying on complex SVG content rendering correctly).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
FileName / Buffer,BufSize | The SVG source. |
PosX, PosY, Width, Height | Placement box. |
Flags | Accepted but silently dropped. |
Return value. True on success; False if the file doesn't exist / buffer is empty, or the SVG failed to parse.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfInsertSVGEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.