source: trunk/client/inc/hpdf5/spipu/html2pdf/doc/svg.md

Last change on this file was 347, checked in by roby, 4 years ago

Aggiornamento per compatibilità con php7.4

File size: 2.1 KB
Line 
1# SVG tags
2
3[back](./README.md)
4
5## Tag draw
6
7A new html tag `<draw>` has been implemented.
8
9It allows to insert a SVG image in your PDF.
10
11The only allowed attributes are `css` and `class`.
12
13Example:
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
51See http://www.w3.org/TR/SVG11/expanded-toc.html
52
53[back](./README.md)
Note: See TracBrowser for help on using the repository browser.