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 LongDLL
int DLDrawSVG(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * SVG, const wchar_t * AltText);Parameters
| Left | Horizontal position of the destination rectangle |
|---|---|
| Top | Top edge of the destination rectangle |
| Width | Destination width in the current measurement units |
| Height | Destination height in the current measurement units |
| SVG | SVG source containing the vector geometry |
| AltText | Accessible 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