DrawSVGFromFile
Vector graphics, SVG, File input
Description
Loads an SVG file and draws its supported geometry inside a rectangular page area as native PDF paths
Syntax
Delphi
Function TPDFlib.DrawSVGFromFile(Left, Top, Width, Height: Double; Const FileName, AltText: WideString): Integer;ActiveX
Function PDFlib::DrawSVGFromFile(Left As Double, Top As Double, Width As Double, Height As Double, FileName As String, AltText As String) As LongDLL
int DLDrawSVGFromFile(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * FileName, 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 |
| FileName | Path to a UTF-8, UTF-16LE, or UTF-16BE SVG file no larger than 16 MiB |
| 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 when the file cannot be read or its SVG source is invalid
Remarks
The file content enters the same bounded parser and most-recent-source cache used by DrawSVG
No external resource referenced by the SVG is opened
The DLL DLDrawSVGFromFileA variant accepts the file name and alternative text according to the configured ANSI mode