2 from pdflib_py import *
4 PDF_open_file(p, "links.pdf")
6 PDF_set_parameter(p, "usercoordinates", "true")
7 PDF_set_info(p, "Creator", "links.py")
12 PDF_begin_page(p, width, height)
13 def draw_link(x1,y1,x2,y2,url):
14 action = PDF_create_action(p, "URI", "url="+url);
15 optlist = "action={activate "+str(action)+"} linewidth=5"
16 PDF_create_annotation(p, x1,y1,x2,y2, "Link", optlist);
17 draw_link(0, 0, 100, 100, "http://www.swftools.org")
18 draw_link(0, 100, 100, 200, "http://www.quiss.org")
21 PDF_begin_page(p, width, height)
22 draw_link(0, 0, 100, 100, "http://www.pdf2swf.org")