iTextSharp.text.pdf.PdfAcroForm.SetCheckBoxParams C# (CSharp) Метод

SetCheckBoxParams() публичный Метод

public SetCheckBoxParams ( PdfFormField field, string name, string value, bool status, float llx, float lly, float urx, float ury ) : void
field PdfFormField
name string
value string
status bool
llx float
lly float
urx float
ury float
Результат void
        public void SetCheckBoxParams(PdfFormField field, string name, string value, bool status, float llx, float lly, float urx, float ury)
        {
            field.SetWidget(new Rectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_TOGGLE);
            field.FieldName = name;
            if (status) {
            field.ValueAsName = value;
            field.AppearanceState = value;
            }
            else {
            field.ValueAsName = "Off";
            field.AppearanceState = "Off";
            }
            field.Flags = PdfAnnotation.FLAGS_PRINT;
            field.SetPage();
            field.BorderStyle = new PdfBorderDictionary(1, PdfBorderDictionary.STYLE_SOLID);
        }