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:
Name | Type | Description |
---|---|---|
SVG-Data |
string | 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