• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# pdf.PdfFormField类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中iTextSharp.text.pdf.PdfFormField的典型用法代码示例。如果您正苦于以下问题:C# PdfFormField类的具体用法?C# PdfFormField怎么用?C# PdfFormField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PdfFormField类属于iTextSharp.text.pdf命名空间,在下文中一共展示了PdfFormField类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ChildFieldEvent

// ---------------------------------------------------------------------------    
    public ChildFieldEvent(
      PdfFormField parent, PdfFormField kid, float padding) 
    {
      this.parent = parent;
      this.kid = kid;
      this.padding = padding;
    }
开发者ID:kuujinbo,项目名称:iTextInAction2Ed,代码行数:8,代码来源:ChildFieldEvent.cs


示例2: CreateEmpty

 public static PdfFormField CreateEmpty(PdfWriter writer) {
     PdfFormField field = new PdfFormField(writer);
     return field;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:4,代码来源:PdfFormField.cs


示例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);
         }
     }
 }
开发者ID:yu0410aries,项目名称:itextsharp,代码行数:9,代码来源:PdfStamperImp.cs


示例4: 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);
         }
     }
 }
开发者ID:hjgode,项目名称:iTextSharpCF,代码行数:10,代码来源:PdfStamperImp.cs


示例5: 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;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:16,代码来源:PdfAcroForm.cs


示例6: 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);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:8,代码来源:PdfAcroForm.cs


示例7: AddRadioGroup

 virtual public void AddRadioGroup(PdfFormField radiogroup) {
     AddFormField(radiogroup);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:3,代码来源:PdfAcroForm.cs


示例8: 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);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:15,代码来源:PdfAcroForm.cs


示例9: AddCalculationOrder

 /**
  * Adds an object to the calculationOrder.
  */
 virtual public void AddCalculationOrder(PdfFormField formField) {
     calculationOrder.Add(formField.IndirectReference);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:6,代码来源:PdfAcroForm.cs


示例10: 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);
     }
 }
开发者ID:boecko,项目名称:iTextSharp,代码行数:9,代码来源:PdfCopy.cs


示例11: AddKid

 virtual public void AddKid(PdfFormField field) {
     field.parent = this;
     if (kids == null)
         kids = new List<PdfFormField>();
     kids.Add(field);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:6,代码来源:PdfFormField.cs


示例12: CreateSignature

 public static PdfFormField CreateSignature(PdfWriter writer) {
     PdfFormField field = new PdfFormField(writer);
     field.Put(PdfName.FT, PdfName.SIG);
     return field;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:5,代码来源:PdfFormField.cs


示例13: 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;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:9,代码来源:PdfFormField.cs


示例14: 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;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:10,代码来源:PdfFormField.cs


示例15: CreateButton

 protected static PdfFormField CreateButton(PdfWriter writer, int flags) {
     PdfFormField field = new PdfFormField(writer);
     field.Button = flags;
     return field;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:5,代码来源:PdfFormField.cs


示例16: DrawSingleLineOfText

 virtual public void DrawSingleLineOfText(PdfFormField field, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury) {
     PdfAppearance tp = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
     PdfAppearance tp2 = (PdfAppearance)tp.Duplicate;
     tp2.SetFontAndSize(font, fontSize);
     tp2.ResetRGBColorFill();
     field.DefaultAppearanceString = tp2;
     tp.DrawTextField(0f, 0f, urx - llx, ury - lly);
     tp.BeginVariableText();
     tp.SaveState();
     tp.Rectangle(3f, 3f, urx - llx - 6f, ury - lly - 6f);
     tp.Clip();
     tp.NewPath();
     tp.BeginText();
     tp.SetFontAndSize(font, fontSize);
     tp.ResetRGBColorFill();
     tp.SetTextMatrix(4, (ury - lly) / 2 - (fontSize * 0.3f));
     tp.ShowText(text);
     tp.EndText();
     tp.RestoreState();
     tp.EndVariableText();
     field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:22,代码来源:PdfAcroForm.cs


示例17: DrawMultiLineOfText

 virtual public void DrawMultiLineOfText(PdfFormField field, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury) {
     PdfAppearance tp = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
     PdfAppearance tp2 = (PdfAppearance)tp.Duplicate;
     tp2.SetFontAndSize(font, fontSize);
     tp2.ResetRGBColorFill();
     field.DefaultAppearanceString = tp2;
     tp.DrawTextField(0f, 0f, urx - llx, ury - lly);
     tp.BeginVariableText();
     tp.SaveState();
     tp.Rectangle(3f, 3f, urx - llx - 6f, ury - lly - 6f);
     tp.Clip();
     tp.NewPath();
     tp.BeginText();
     tp.SetFontAndSize(font, fontSize);
     tp.ResetRGBColorFill();
     tp.SetTextMatrix(4, 5);
     System.util.StringTokenizer tokenizer = new System.util.StringTokenizer(text, "\n");
     float yPos = ury - lly;
     while (tokenizer.HasMoreTokens()) {
         yPos -= fontSize * 1.2f;
         tp.ShowTextAligned(PdfContentByte.ALIGN_LEFT, tokenizer.NextToken(), 3, yPos, 0);
     }
     tp.EndText();
     tp.RestoreState();
     tp.EndVariableText();
     field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:27,代码来源:PdfAcroForm.cs


示例18: AddFormField

 /**
  * Adds a formfield to the AcroForm.
  */
 virtual public void AddFormField(PdfFormField formField) {
     writer.AddAnnotation(formField);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:6,代码来源:PdfAcroForm.cs


示例19: DrawCheckBoxAppearences

 virtual public void DrawCheckBoxAppearences(PdfFormField field, string value, float llx, float lly, float urx, float ury) {
     BaseFont font = BaseFont.CreateFont(BaseFont.ZAPFDINGBATS, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
     float size = (ury - lly);
     PdfAppearance tpOn = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
     PdfAppearance tp2 = (PdfAppearance)tpOn.Duplicate;
     tp2.SetFontAndSize(font, size);
     tp2.ResetRGBColorFill();
     field.DefaultAppearanceString = tp2;
     tpOn.DrawTextField(0f, 0f, urx - llx, ury - lly);
     tpOn.SaveState();
     tpOn.ResetRGBColorFill();
     tpOn.BeginText();
     tpOn.SetFontAndSize(font, size);
     tpOn.ShowTextAligned(PdfContentByte.ALIGN_CENTER, "4", (urx - llx) / 2, (ury - lly) / 2 - (size * 0.3f), 0);
     tpOn.EndText();
     tpOn.RestoreState();
     field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, value, tpOn);
     PdfAppearance tpOff = PdfAppearance.CreateAppearance(writer, urx - llx, ury - lly);
     tpOff.DrawTextField(0f, 0f, urx - llx, ury - lly);
     field.SetAppearance(PdfAnnotation.APPEARANCE_NORMAL, "Off", tpOff);
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:21,代码来源:PdfAcroForm.cs


示例20: AddHtmlPostButton

 virtual public PdfFormField AddHtmlPostButton(string name, string caption, string value, string url, BaseFont font, float fontSize, float llx, float lly, float urx, float ury) {
     PdfAction action = PdfAction.CreateSubmitForm(url, null, PdfAction.SUBMIT_HTML_FORMAT);
     PdfFormField button = new PdfFormField(writer, llx, lly, urx, ury, action);
     SetButtonParams(button, PdfFormField.FF_PUSHBUTTON, name, value);
     DrawButton(button, caption, font, fontSize, llx, lly, urx, ury);
     AddFormField(button);
 return button;
 }
开发者ID:jagruti23,项目名称:itextsharp,代码行数:8,代码来源:PdfAcroForm.cs



注:本文中的iTextSharp.text.pdf.PdfFormField类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# pdf.PdfGState类代码示例发布时间:2022-05-26
下一篇:
C# pdf.PdfFileSpecification类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap