本文整理匯總了C#中iTextSharp.text.pdf.PdfFormField.SetWidget方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfFormField.SetWidget方法的具體用法?C# PdfFormField.SetWidget怎麽用?C# PdfFormField.SetWidget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.pdf.PdfFormField
的用法示例。
在下文中一共展示了PdfFormField.SetWidget方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetSignatureParams
/**
* @param field
* @param name
* @param llx
* @param lly
* @param urx
* @param ury
*/
virtual public void SetSignatureParams(PdfFormField field, String name, float llx, float lly, float urx, float ury) {
field.SetWidget(new Rectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
field.FieldName = name;
field.Flags = PdfAnnotation.FLAGS_PRINT;
field.SetPage();
field.MKBorderColor = BaseColor.BLACK;
field.MKBackgroundColor = BaseColor.WHITE;
}
示例2: SetCheckBoxParams
virtual 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);
}
示例3: SetChoiceParams
virtual public void SetChoiceParams(PdfFormField field, string name, string defaultValue, float llx, float lly, float urx, float ury) {
field.SetWidget(new Rectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
if (defaultValue != null) {
field.ValueAsString = defaultValue;
field.DefaultValueAsString = defaultValue;
}
field.FieldName = name;
field.Flags = PdfAnnotation.FLAGS_PRINT;
field.SetPage();
field.BorderStyle = new PdfBorderDictionary(2, PdfBorderDictionary.STYLE_SOLID);
}
示例4: SetTextFieldParams
virtual public void SetTextFieldParams(PdfFormField field, string text, string name, float llx, float lly, float urx, float ury) {
field.SetWidget(new Rectangle(llx, lly, urx, ury), PdfAnnotation.HIGHLIGHT_INVERT);
field.ValueAsString = text;
field.DefaultValueAsString = text;
field.FieldName = name;
field.Flags = PdfAnnotation.FLAGS_PRINT;
field.SetPage();
}