| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
DynaPDF.GetSVGSize
Retrieves the width and height of a SVG graphic.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| DynaPDF | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.GetSVGSize"; PDF { ; SymbolID } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| The PDF reference returned from DynaPDF.New. | |||
| SymbolID | The symbol ID. | Optional |
Result
Returns JSON or error.
Description
Retrieves the width and height of a SVG graphic.The parameter SymbolID is optional, it can be used to load a specific symbol of a SVG symbol file.
SVG files are available in different flavors. Regular SVG files contain exactly one graphic but SVG files can also contain more than one graphic or symbol. Such symbol files contain no visible graphic if loaded without a symbol name. The number of symbols that a SVG file contains can be determined with the function DynaPDF.GetSVGSymbolCount. The parameter SymbolID must be the name of the desired symbol or "".
Errors and warnings are passed to the error log. See DynaPDF.ErrLogMessage for further information.
If the function succeeds the return value is JSON with width and height.
See also GetSVGSize function in DynaPDF manual.
Examples
Get the size of a SVG:
Let(
[
path = "/Users/cs/Desktop/EUworld.svg" ;
pdf = MBS( "DynaPDF.New" ) ;
r = MBS( "DynaPDF.LoadSVGFile" ; pdf; path ) ;
size = MBS( "DynaPDF.GetSVGSize" ; PDF ) ;
r = MBS( "DynaPDF.Release" ; pdf )
] ;
size
)
Example result:
{ "SymbolID": null, "width": 704.810425, "height": 357.545715 }
[
path = "/Users/cs/Desktop/EUworld.svg" ;
pdf = MBS( "DynaPDF.New" ) ;
r = MBS( "DynaPDF.LoadSVGFile" ; pdf; path ) ;
size = MBS( "DynaPDF.GetSVGSize" ; PDF ) ;
r = MBS( "DynaPDF.Release" ; pdf )
] ;
size
)
Example result:
{ "SymbolID": null, "width": 704.810425, "height": 357.545715 }
See also
- DynaPDF.ErrLogMessage
- DynaPDF.GetFontSize
- DynaPDF.GetSVGSizes
- DynaPDF.GetSVGSymbolCount
- DynaPDF.LoadSVG
- DynaPDF.LoadSVGFile
- DynaPDF.New
- DynaPDF.Release
Release notes
- Version 16.4
- Added DynaPDF.GetSVGSize, DynaPDF.GetSVGSymbolCount and DynaPDF.GetSVGSymbolName functions.
Blog Entries
This function checks for a license.
Created 8th August 2026, last changed 9th August 2026
MarkDown version: DynaPDFGetSVGSize.md