• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support

Text Field

Creates a text form field on a PDF page.

Code

using DRIT.Pdf;

using var doc = new PdfDocument();
var page = doc.Pages.Add(PdfPageSize.A4);

// Add a text field
var textField = doc.Forms.AddField(new PdfRect(100, 700, 200, 25), "username");
textField.FieldType = PdfFieldType.Text;
textField.DefaultValue = "Enter your name";

doc.Save("textfield.pdf");

Output

textfield.pdf

  • Improve this Doc
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX