DrawSVG

Vector graphics, SVG, Page content

Description

Draws SVG geometry inside a rectangular page area as native PDF paths without creating a raster image XObject

Syntax

Delphi

Function TPDFlib.DrawSVG(Left, Top, Width, Height: Double; Const SVG, AltText: WideString): Integer;

ActiveX

Function PDFlib::DrawSVG(Left As Double, Top As Double, Width As Double, Height As Double, SVG As String, AltText As String) As Long

DLL

int DLDrawSVG(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * SVG, const wchar_t * AltText);

Parameters

LeftHorizontal position of the destination rectangle
TopTop edge of the destination rectangle
WidthDestination width in the current measurement units
HeightDestination height in the current measurement units
SVGSVG source containing the vector geometry
AltTextAccessible description used when automatic tagging opens a Figure structure element

Return values

Returns 1 when at least one supported vector shape is drawn, or 0 for empty, invalid, oversized, or unsupported-only input

Remarks

The supported vector subset includes svg, g, defs, use, clipPath, all standard path commands, basic geometry, transforms, view-box alignment, presentation attributes, simple tag, .class, and #id CSS rules, inline styles, fill, stroke, dash, and opacity

Input is limited to 16 MiB, 100000 elements, and 128 nesting levels and does not load external resources

Gradient paint servers use their first colour stop as a solid fallback, while SVG text, external images, masks, and filters are ignored

The DLL DLDrawSVGA variant accepts text according to the configured ANSI mode