本文整理汇总了C#中iTextSharp.text.pdf.PdfFormField类的典型用法代码示例。如果您正苦于以下问题:C# PdfFormField类的具体用法?C# PdfFormField怎么用?C# PdfFormField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PdfFormField类属于iTextSharp.text.pdf命名空间,在下文中一共展示了PdfFormField类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChildFieldEvent
// ---------------------------------------------------------------------------
public ChildFieldEvent(
PdfFormField parent, PdfFormField kid, float padding)
{
this.parent = parent;
this.kid = kid;
this.padding = padding;
}
示例2: CreateEmpty
public static PdfFormField CreateEmpty(PdfWriter writer) {
PdfFormField field = new PdfFormField(writer);
return field;
}
示例3: ExpandFields
internal void ExpandFields(PdfFormField field, List<PdfAnnotation> allAnnots) {
allAnnots.Add(field);
List<PdfFormField> kids = field.Kids;
if (kids != null) {
for (int k = 0; k < kids.Count; ++k) {
ExpandFields(kids[k], allAnnots);
}
}
}
示例4: CreateTextField
public static PdfFormField CreateTextField(PdfWriter writer, bool multiline, bool password, int maxLen) {
PdfFormField field = new PdfFormField(writer);
field.Put(PdfName.FT, PdfName.TX);
int flags = (multiline ? FF_MULTILINE : 0);
flags += (password ? FF_PASSWORD : 0);
field.Put(PdfName.FF, new PdfNumber(flags));
if (maxLen > 0)
field.Put(PdfName.MAXLEN, new PdfNumber(maxLen));
return field;
}
示例5: ExpandFields
internal void ExpandFields(PdfFormField field, ArrayList allAnnots)
{
allAnnots.Add(field);
ArrayList kids = field.Kids;
if (kids != null) {
for (int k = 0; k < kids.Count; ++k) {
ExpandFields((PdfFormField)kids[k], allAnnots);
}
}
}
示例6: 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;
}
示例7: DrawRadioAppearences
virtual public void DrawRadioAppearences(PdfFormField field, string value, float llx, float lly, float urx, float ury) {
PdfAppearance tpOn = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
tpOn.DrawRadioField(0f, 0f, urx - llx, ury - lly, true);
field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, value, tpOn);
PdfAppearance tpOff = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
tpOff.DrawRadioField(0f, 0f, urx - llx, ury - lly, false);
field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", tpOff);
}
示例8: AddRadioGroup
virtual public void AddRadioGroup(PdfFormField radiogroup) {
AddFormField(radiogroup);
}
示例9: 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);
}
示例10: AddCalculationOrder
/**
* Adds an object to the calculationOrder.
*/
virtual public void AddCalculationOrder(PdfFormField formField) {
calculationOrder.Add(formField.IndirectReference);
}
示例11: ExpandFields
private void ExpandFields(PdfFormField field, List<PdfAnnotation> allAnnots)
{
allAnnots.Add(field);
List<PdfFormField> kids = field.Kids;
if (kids != null) {
foreach (PdfFormField f in kids)
ExpandFields(f, allAnnots);
}
}
示例12: AddKid
virtual public void AddKid(PdfFormField field) {
field.parent = this;
if (kids == null)
kids = new List<PdfFormField>();
kids.Add(field);
}
示例13: CreateSignature
public static PdfFormField CreateSignature(PdfWriter writer) {
PdfFormField field = new PdfFormField(writer);
field.Put(PdfName.FT, PdfName.SIG);
return field;
}
示例14: CreateChoice
protected static PdfFormField CreateChoice(PdfWriter writer, int flags, PdfArray options, int topIndex) {
PdfFormField field = new PdfFormField(writer);
field.Put(PdfName.FT, PdfName.CH);
field.Put(PdfName.FF, new PdfNumber(flags));
field.Put(PdfName.OPT, options);
if (topIndex > 0)
field.Put(PdfName.TI, new PdfNumber(topIndex));
return field;
}
示例15: CreateButton
protected static PdfFormField CreateButton(PdfWriter writer, int flags) {
PdfFormField field = new PdfFormField(writer);
field.Button = flags;
return field;
}