1

Bon, ben dans la prochaine version, il y aura également la possibilité de faire du dessin vectoriel.

voici un exemple :
http://html2pdf.fr/_html2pdf/exemples/pdf/draw.pdf

avec le code permettant de le générer :
<page>
	<draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
		<polygone fillcolor="#AAAA00" linecolor="#0000AA" s="1mm" path="S 20mm 10mm ; L 130mm 10mm ; C 140mm 20mm 140mm 10mm A; L 140mm 80mm ; C 130mm 90mm 140mm 90mm A; L 20mm 90mm ; C 10mm 80mm  10mm 90mm A; L 10mm 20mm ; C 20mm 10mm  10mm 10mm A">
		<polygone fillcolor="#770000" linecolor="#AA0033" s="0.5mm" path="S 20mm  50mm ; C 40mm  50mm  30mm 40mm H ; F">
		<polygone fillcolor="#770000" linecolor="#AA0033" s="0.5mm" path="S 50mm  50mm ; C 70mm  50mm  60mm 45mm H ; F">
		<polygone fillcolor="#770000" linecolor="#AA0033" s="0.5mm" path="S 80mm  50mm ; C 100mm 50mm  90mm 50mm H ; F">
		<polygone fillcolor="#770000" linecolor="#AA0033" s="0.5mm" path="S 110mm 50mm ; C 130mm 50mm 120mm 55mm H ; F">
		<polygone fillcolor="#007700" linecolor="#00AA33" s="0.5mm" path="S 20mm  50mm ; C 40mm  50mm  30mm 40mm A ; F">
		<polygone fillcolor="#007700" linecolor="#00AA33" s="0.5mm" path="S 50mm  50mm ; C 70mm  50mm  60mm 45mm A ; F">
		<polygone fillcolor="#007700" linecolor="#00AA33" s="0.5mm" path="S 80mm  50mm ; C 100mm 50mm  90mm 50mm A ; F">
		<polygone fillcolor="#007700" linecolor="#00AA33" s="0.5mm" path="S 110mm 50mm ; C 130mm 50mm 120mm 55mm A ; F">
		<line x1="29mm"  y1="40mm" x2="31mm"  y2="40mm" s="1mm" linecolor="#0000FF">
		<line x1="59mm"  y1="45mm" x2="61mm"  y2="45mm" s="1mm" linecolor="#0000FF">
		<line x1="89mm"  y1="50mm" x2="91mm"  y2="50mm" s="1mm" linecolor="#0000FF">
		<line x1="119mm" y1="55mm" x2="121mm" y2="55mm" s="1mm" linecolor="#0000FF">
	</draw><br>
	<draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
		<line x1="10mm" y1="10mm" x2="140mm" y2="10mm" s="1mm" linecolor="#FF0000" >
		<rect x="15%" y="15%" w="70%" h="70%" s="1mm" fillcolor="#00AAAA" linecolor="#AA00AA">
		<ellipse x="50%" y="50%" rx="30%" ry="30%" s="1mm" fillcolor="#AAAA00" linecolor="#0000AA">
		<circle x="50%" y="50%" r="20%" s="1mm" fillcolor="#AAAA00" linecolor="#0000AA">
	</draw><br>
	<ul>
		<li>line : from (x1,y1) to (x2,y2)</li>
		<li>rect : from (x,y), width (w) and height (h)</li>
		<li>circle : center (x,y), radius (r)</li>
		<li>ellipse : center (x,y), radius (rx, ry)</li>
		<li>
			polygone : follow the path
			<ul>
				<li>S x y : Start from point (x,y)</li>
				<li>L x y : Line from previous point to point (x,y)</li>
				<li>C x y xc yc s : arc of circle from to previous point to point (x,y) around the center (xc,yc) with sens (s).<br>(s) can be A or H</li>
				<li>F : close the path to the first point</li> 
			</ul>
		</li>
	</ul>
</page>


si vous avez des critiques sur le format, n'hésitez pas car rien n'est fixé pour l'instant !
Ancien pseudo : lolo

2

rah mais quelle lib, c'te lib heart top

dès que j'aurai l'occasion d'avoir besoin de générer des PDF, ça va être un bonheur grin

tu pourrais appeler tes polygones "path objects" et ajouter le support des béziers/splines en plus des arcs de cercle smile

3

c'est en train justement d'être fait smile
Ancien pseudo : lolo

4

bon, ben j'ai pas mal amélioré, le nouveau format est ca :
<page>
	<draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
		<polygone fill="#AAAA00" color="#0000AA" stroke="1mm" path="S 20mm 10mm ; L 130mm 10mm ; A 140mm 20mm 140mm 10mm P; L 140mm 80mm ; A 130mm 90mm 140mm 90mm P; L 20mm 90mm ; A 10mm 80mm  10mm 90mm P; L 10mm 20mm ; A 20mm 10mm  10mm 10mm P">
		<polygone fill="#770000" color="#AA0033" stroke="0.5mm" path="S 20mm  50mm ; A 40mm  50mm  30mm 40mm N ; F">
		<polygone fill="#770000" color="#AA0033" stroke="0.5mm" path="S 50mm  50mm ; A 70mm  50mm  60mm 45mm N ; F">
		<polygone fill="#770000" color="#AA0033" stroke="0.5mm" path="S 80mm  50mm ; A 100mm 50mm  90mm 50mm N ; F">
		<polygone fill="#770000" color="#AA0033" stroke="0.5mm" path="S 110mm 50mm ; A 130mm 50mm 120mm 55mm N ; F">
		<polygone fill="#007700" color="#00AA33" stroke="0.5mm" path="S 20mm  50mm ; A 40mm  50mm  30mm 40mm P ; F">
		<polygone fill="#007700" color="#00AA33" stroke="0.5mm" path="S 50mm  50mm ; A 70mm  50mm  60mm 45mm P ; F">
		<polygone fill="#007700" color="#00AA33" stroke="0.5mm" path="S 80mm  50mm ; A 100mm 50mm  90mm 50mm P ; F">
		<polygone fill="#007700" color="#00AA33" stroke="0.5mm" path="S 110mm 50mm ; A 130mm 50mm 120mm 55mm P ; F">
		<line p1="29mm 40mm"  p2="31mm 40mm"  stroke="1mm" color="#0000FF">
		<line p1="59mm 45mm"  p2="61mm 45mm"  stroke="1mm" color="#0000FF">
		<line p1="89mm 50mm"  p2="91mm 50mm"  stroke="1mm" color="#0000FF">
		<line p1="119mm 55mm" p2="121mm 55mm" stroke="1mm" color="#0000FF">
	</draw><br>
	<draw style="margin: auto; width:150mm; height:100mm; background: #000000; border: solid 0.5mm #777777;">
		<line p1="10mm 10mm" p2="140mm 10mm" stroke="1mm" color="#FF0000" >
		<rect p1="15%  15%"  p2="85% 85%"    stroke="1mm" color="#770077" fill="#008888">
		<ellipse pt="50% 50%" r="30% 30%" stroke="1mm" color="#000077" fill="#888800">
		<circle  pt="50% 50%" r="15%"     stroke="1mm" color="#0000AA" fill="#AAAA00">
	</draw><br>
	<ul>
		<li>line : from (p1) to (p2) with stroke (stroke)</li>
		<li>rect : from (p1) to (p2) with stroke (stroke)</li>
		<li>circle : center (pc), radius (r) with stroke (stroke)</li>
		<li>ellipse : center (pc), radius (r) with stroke (stroke)</li>
		<li>
			polygone : follow the path with stroke (stroke)
			<ul>
				<li>S pt : Start from point (pt)</li>
				<li>L pt : Line from previous point to point (pt)</li>
				<li>A pt pc d : arc of circle from to previous point to point (pt) around the center (pc) with direction (d).<br>(d) can be A or H</li>
				<li>C p1 p2 pt : curve from to previous point to point (pt) using (p1) and (p2) as the Bezier control points</li>
				<li>F : close the path to the first point</li> 
			</ul>
		</li>
	</ul>
</page>


et on peut meme faire ceci : http://html2pdf.fr/_html2pdf/exemples/pdf/tigre.pdf
Ancien pseudo : lolo

5

6

Bon, ben j'ai tout refais... cheeky maintenant, ca utilise la meme syntaxe que le SVG !

petit exemple de conversion de svg : http://html2pdf.fr/_html2pdf/exemples/pdf/sapin.pdf
Ancien pseudo : lolo

7

J'allais justement suggérer d'utiliser un sous-ensemble de SVG hehe

Bonne idée, en tout cas top
avatar
<<< Kernel Extremis©®™ >>> et Inventeur de la différence administratif/judiciaire ! (©Yoshi Noir)

<Vertyos> un poil plus mais elle suce bien quand même la mienne ^^
<Sabrina`> tinkiete flan c juste qu'ils sont jaloux que je te trouve aussi appétissant