Merge branch 'master' of git.swftools.org:/home/git/swftools-internal
[swftools.git] / spec / textarea.py
blob4a77043d62b82706baffd9cea2bfb2908f161cf9
1 from sys import *
2 from pdflib_py import *
3 import md5
4 p = PDF_new()
5 PDF_open_file(p, "textarea.pdf")
7 PDF_set_parameter(p, "usercoordinates", "true")
9 PDF_set_info(p, "Creator", "smalltext.py")
10 PDF_begin_page(p, 612, 3000)
11 font = PDF_load_font(p, "Courier", "host", "")
13 PDF_setfont(p, font, 12.0)
14 i = 0
15 # the idea is to overflow the placetext matrix once, so that
16 # we have at least two different ty values
17 for y in range(3000 / 9):
18 PDF_set_text_pos(p, 0, y*9);
19 text = "".join([md5.md5(str(i+j*732849)).hexdigest() for j in range(3)])
20 print text
21 PDF_show(p, text)
22 i = i + 1
24 PDF_end_page(p)
25 PDF_close(p)
26 PDF_delete(p);