lib/field.rb in fillable-pdf-0.6 vs lib/field.rb in fillable-pdf-0.7
- old
+ new
@@ -1,14 +1,10 @@
require_relative 'fillable-pdf/itext'
class Field
- ACRO_FIELDS = Rjb.import('com.itextpdf.text.pdf.AcroFields')
+ PDF_NAME = Rjb.import('com.itextpdf.kernel.pdf.PdfName')
- CHECKBOX = ACRO_FIELDS.FIELD_TYPE_CHECKBOX
- COMBO = ACRO_FIELDS.FIELD_TYPE_COMBO
- LIST = ACRO_FIELDS.FIELD_TYPE_LIST
- NONE = ACRO_FIELDS.FIELD_TYPE_NONE
- PUSHBUTTON = ACRO_FIELDS.FIELD_TYPE_PUSHBUTTON
- RADIOBUTTON = ACRO_FIELDS.FIELD_TYPE_RADIOBUTTON
- SIGNATURE = ACRO_FIELDS.FIELD_TYPE_SIGNATURE
- TEXT = ACRO_FIELDS.FIELD_TYPE_TEXT
+ BUTTON = PDF_NAME.Btn.toString
+ CHOICE = PDF_NAME.Ch.toString
+ SIGNATURE = PDF_NAME.Sig.toString
+ TEXT = PDF_NAME.Tx.toString
end