Back to Jspdf

svg

docs/module-svg.html

4.2.11.1 KB
Original Source

jsPDF SVG plugin

Source:

Methods

(inner) addSvgAsImage(SVG-Data, x, y, width, height, alias, compression, rotation)

Source:

Parses SVG XML and saves it as image into the PDF.

Depends on canvas-element and canvg

Parameters:
NameTypeDescription
SVG-Datastring

as Text

| | x | number |

Coordinate (in units declared at inception of PDF document) against left edge of the page

| | y | number |

Coordinate (in units declared at inception of PDF document) against upper edge of the page

| | width | number |

of SVG-Image (in units declared at inception of PDF document)

| | height | number |

of SVG-Image (in units declared at inception of PDF document)

| | alias | string |

of SVG-Image (if used multiple times)

| | compression | string |

of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'

| | rotation | number |

of the image in degrees (0-359)

|

Returns:

jsPDF jsPDF-instance