[347] | 1 | # SVG tags
|
---|
| 2 |
|
---|
| 3 | [back](./README.md)
|
---|
| 4 |
|
---|
| 5 | ## Tag draw
|
---|
| 6 |
|
---|
| 7 | A new html tag `<draw>` has been implemented.
|
---|
| 8 |
|
---|
| 9 | It allows to insert a SVG image in your PDF.
|
---|
| 10 |
|
---|
| 11 | The only allowed attributes are `css` and `class`.
|
---|
| 12 |
|
---|
| 13 | Example:
|
---|
| 14 |
|
---|
| 15 | ```html
|
---|
| 16 | <page>
|
---|
| 17 | <draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
|
---|
| 18 | <line style="stroke:#FF0000; stroke-width:1mm" x1="10mm" y1="10mm" x2="140mm" y2="10mm" >
|
---|
| 19 | <rect style="stroke:#770077; stroke-width:1mm; fill:#008888" x="15%" y="15%" w="70%" h="70%">
|
---|
| 20 | <ellipse style="stroke:#000077; stroke-width:1mm; fill:#888800" cx="50%" cy="50%" rx="30%" ry="30%">
|
---|
| 21 | <circle style="stroke:#0000AA; stroke-width:1mm; fill:#AAAA00" cx="50%" cy="50%" r="15%">
|
---|
| 22 | </draw><br>
|
---|
| 23 | <draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
|
---|
| 24 | <path style="fill:#AAAA00; stroke:#0000AA; stroke-width:1mm" d="M20mm,10mm H130mm A10mm,10mm 0,0,0 140mm,20mm V80mm A10mm,10mm 0,0,0 130mm,90mm H20mm A10mm,10mm 0,0,0 10mm,80mm V20mm A10mm,10mm 0,0,0 20mm,10mm">
|
---|
| 25 | <path style="fill:#770000; stroke:#AA0033; stroke-width:0.5mm" d="M 20mm,40mm a16mm,8mm 0,0,0 16mm,8mm" />
|
---|
| 26 | <path style="fill:#770000; stroke:#00AA33; stroke-width:0.5mm" d="M 20mm,40mm l16mm,8mm" />
|
---|
| 27 | <path style="fill:#770000; stroke:#AA0033; stroke-width:0.5mm" d="M 40mm,40mm a16mm,8mm 0,0,1 16mm,8mm" />
|
---|
| 28 | <path style="fill:#770000; stroke:#00AA33; stroke-width:0.5mm" d="M 40mm,40mm l16mm,8mm" />
|
---|
| 29 | <path style="fill:#770000; stroke:#AA0033; stroke-width:0.5mm" d="M 80mm,40mm a16mm,8mm 0,1,0 16mm,8mm" />
|
---|
| 30 | <path style="fill:#770000; stroke:#00AA33; stroke-width:0.5mm" d="M 80mm,40mm l16mm,8mm" />
|
---|
| 31 | <path style="fill:#770000; stroke:#AA0033; stroke-width:0.5mm" d="M100mm,40mm a16mm,8mm 0,1,1 16mm,8mm" />
|
---|
| 32 | <path style="fill:#770000; stroke:#00AA33; stroke-width:0.5mm" d="M100mm,40mm l16mm,8mm" />
|
---|
| 33 | </draw><br>
|
---|
| 34 | <br>
|
---|
| 35 | </page>
|
---|
| 36 | ```
|
---|
| 37 |
|
---|
| 38 | ## Allowed SVG tags
|
---|
| 39 |
|
---|
| 40 | * LINE
|
---|
| 41 | * RECT
|
---|
| 42 | * CIRCLE
|
---|
| 43 | * ELLIPSE
|
---|
| 44 | * PATH
|
---|
| 45 | * POLYGON
|
---|
| 46 | * POLYLINE
|
---|
| 47 | * G
|
---|
| 48 |
|
---|
| 49 | ## SVG Documentation
|
---|
| 50 |
|
---|
| 51 | See http://www.w3.org/TR/SVG11/expanded-toc.html
|
---|
| 52 |
|
---|
| 53 | [back](./README.md)
|
---|