ExportPageSVGA

Vector graphics, SVG, extraction

Description

ANSI variant of ExportPageSVG

Accepts string parameters as ANSI text and otherwise behaves identically to the wide-string entry point

Syntax

Delphi

Function TPDFlib.ExportPageSVG(Page, Options: Integer): WideString;

ActiveX

Function PDFlib::ExportPageSVG(Page As Long, Options As Long) As String

DLL

const wchar_t* DLExportPageSVG(int InstanceID, int Page, int Options);
const char* DLExportPageSVGA(int InstanceID, int Page, int Options);

Return values

Returns a self-contained UTF-16 SVG document, or an empty string when validation or extraction fails

Remarks

Painted page paths retain transforms, fill and stroke colours, opacity, line width, cap, join, mitre, dash, even-odd fill, and bounded clipping as SVG path attributes

Text remains searchable and images are embedded as PNG data URIs with a 128 MiB per-image limit, so successful output has no external image dependencies

URI annotations become clickable overlays and internal destinations become #page-N links, while script-capable URI schemes are omitted

Export preserves the original paint order, recursively expands Form content and keeps clip path geometry; unsupported paints request bounded native raster fallback when the settings permit it

The selected page is restored before the call returns and DLL return pointers remain valid until the next string-returning call on the same instance

LastErrorCode is 119 for an invalid page or options and 522 when export fails

Use GetLastSVGExportDiagnostics to inspect omitted pixels, font and colour approximations, and local raster fallback

See also

ExportPageSVGToFile, DrawSVG, ExportPageHTML