add_svg method

add_svg

Adds svg image.

Returns

def add_svg(self, upper_left_row, top, upper_left_column, left, height, width, svg_data, compatible_image_data):
    ...
ParameterTypeDescription
upper_left_rowintUpper left row index.
topintRepresents the vertical offset of shape from its left row, in unit of pixel.
upper_left_columnintUpper left column index.
leftintThe horizontal offset of shape from its left column, in unit of pixel.
heightintThe height of shape, in unit of pixel.
widthintThe width of shape, in unit of pixel.
svg_databytesThe svg image data.
compatible_image_databytesConverted image data from svg in order to be compatible with Excel 2016 or lower versions.

Example

from aspose import pycore
import bytearray
import int

#  add a svg
with open("image.svg", "rb") as fs:
    len = pycore.cast(int, utils.filesize(fs))
    imageData = bytearray(len)
    fs.readinto(imageData)
    picture = shapes.add_svg(4, 0, 5, 0, -1, -1, imageData, None)

See Also