add UnicodeEngine (MultiEngineText and axis texters returning MultiEngineText), texte...
[PyX.git] / test / svg / svgtest.py
bloba1020b01519c953c467ecbf4719fa4632f82a321
1 import sys; sys.path.insert(0, "../..")
2 from glob import glob
3 from pyx import *
4 from PIL import Image
6 d = document.document()
7 for i, f in enumerate(glob('suite/svg/shapes-*.svg') +
8 glob('suite/svg/paths-data-*.svg')):
9 #if i + 1 != 15: continue
10 print(i+1, f)
11 c = canvas.canvas()
12 i = Image.open(f.replace('svg', 'png'))
13 b = bitmap.bitmap(0, 0, i)
14 c.insert(b)
15 c.insert(svgfile.svgfile(b.bbox().width(), 0, f, parsed=True, resolution=i.info["dpi"][0]))
16 d.append(document.page(c))
17 d.writePDFfile()