PDF .NET Library  .NET PDF Component Library. PDF creator, PDF maker.
Home Products Code Library Online Demos Support Buy About Us  
Code Library

Creating AcroForms using PDFTechLib

The following code snippet creates a PDF AcroForm that contains various controls.

c# sample:

PDFDocument MyPDF = new PDFDocument("AcroForm.pdf");

MyPDF.CurrentPage.Body.TextOut(50, 50, 0, "State :");

PDFComboBox cmbState = MyPDF.AcroForm.AddPDFComboBox("cmbState", new RectangleF(100, 50, 300, 20), false);

cmbState.Items.Add(new PDFListItem("Georgia", "GA"));

cmbState.Items.Add(new PDFListItem("NewYork", "NY"));

cmbState.Items.Add(new PDFListItem("Washington", "WA"));

cmbState.Items.Add(new PDFListItem("Florida", "FL")); cmbState.SelectedIndex = 1;

MyPDF.Save();

Back to PDF Code Library