2 from pdflib_py import *
5 PDF_open_file(p, "layers.pdf")
7 PDF_set_parameter(p, "usercoordinates", "true")
8 PDF_begin_page(p, 500, 200)
10 font = PDF_load_font(p, "Helvetica-Bold", "host", "")
11 PDF_setfont(p, font, 80.0)
12 PDF_set_text_pos(p, 0, 10)
13 PDF_show(p, "Bottom Text")
15 PDF_setrgbcolor_stroke(p, 0, 1.0, 1.0)
16 PDF_setlinewidth(p, 10)
18 PDF_lineto(p, 500, 100)
24 PDF_setrgbcolor_fill(p, 0, 0, 1.0)
25 PDF_moveto(p, 350, 25)
26 PDF_lineto(p, 490, 25)
27 PDF_lineto(p, 490, 75)
28 PDF_lineto(p, 350, 75)
29 PDF_lineto(p, 350, 25)
32 PDF_setrgbcolor_fill(p, 1, 1, 0)
33 PDF_set_text_pos(p, 400, 20);PDF_show(p, "A")
34 PDF_set_text_pos(p, 400, 80);PDF_show(p, "B")
35 PDF_set_text_pos(p, 400, 140);PDF_show(p, "C")