Пример #1
0
 def selectField(self, canvas, title, value, options, xmin, ymin, xmax,
                 ymax):
     # determine the page ref
     doc = canvas._doc
     page = doc.thisPageRef()
     # determine text info
     R, G, B = obj_R_G_B(canvas._fillColorObj)
     #print "rgb", (R,G,B)
     font = canvas._fontname
     fontsize = canvas._fontsize
     field = SelectField(title,
                         value,
                         options,
                         xmin,
                         ymin,
                         xmax,
                         ymax,
                         page,
                         font=font,
                         fontsize=fontsize,
                         R=R,
                         G=G,
                         B=B)
     self.fields.append(field)
     canvas._addAnnotation(field)
Пример #2
0
 def textField(self, canvas, title, xmin, ymin, xmax, ymax, value="", maxlen=1000000, multiline=0):
     # determine the page ref
     doc = canvas._doc
     page = doc.thisPageRef()
     # determine text info
     R, G, B = obj_R_G_B(canvas._fillColorObj)
     # print "rgb", (R,G,B)
     font = canvas._fontname
     fontsize = canvas._fontsize
     field = TextField(title, value, xmin, ymin, xmax, ymax, page, maxlen, font, fontsize, R, G, B, multiline)
     self.fields.append(field)
     canvas._addAnnotation(field)
Пример #3
0
 def selectField(self, canvas, title, value, options, xmin, ymin, xmax, ymax):
     # determine the page ref
     doc = canvas._doc
     page = doc.thisPageRef()
     # determine text info
     R, G, B = obj_R_G_B(canvas._fillColorObj)
     #print "rgb", (R,G,B)
     font = canvas. _fontname
     fontsize = canvas. _fontsize
     field = SelectField(title, value, options, xmin, ymin, xmax, ymax, page,
           font=font, fontsize=fontsize, R=R, G=G, B=B)
     self.fields.append(field)
     canvas._addAnnotation(field)
Пример #4
0
 def textField(self, canvas, title, xmin, ymin, xmax, ymax, value="", maxlen=1000000, multiline=0):
     # determine the page ref
     doc = canvas._doc
     page = doc.thisPageRef()
     # determine text info
     R, G, B = obj_R_G_B(canvas._fillColorObj)
     #print "rgb", (R,G,B)
     font = canvas. _fontname
     fontsize = canvas. _fontsize
     field = TextField(title, value, xmin, ymin, xmax, ymax, page, maxlen,
                       font, fontsize, R, G, B, multiline)
     self.fields.append(field)
     canvas._addAnnotation(field)