- Home
- Products For Home & Business
- Tools For Developers
- Download
- Purchase
- Support
- Company
QUESTIONS OR COMMENTS ABOUT PRODUCTS? WRITE US AT SUPPORT@BYTESCOUT.COM OR USE THIS FORM
QUESTIONS OR COMMENTS ABOUT PRODUCTS? WRITE US AT SUPPORT@BYTESCOUT.COM OR USE THIS FORM


Price starts at $295 - Shop Safely with a 30-DAY UNCONDITIONAL MONEY-BACK GUARANTEE
For HTML2PDF and XML2PDF solution check our PDFDoc Scout ActiveX library instead
This example demonstrates how to stamp PDF pages with page numbers using Bytescout.PDF library

Download example source code: bytescoutpdf_fill_pdf_form_text_and_checkboxes.zip (10 KB)
using System;
using System.Collections.Generic;
using System.Text;
using Bytescout.PDF;
using System.Diagnostics;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
// Create main PDF Doc Engine
PDFDocEngine engine = new PDFDocEngine("", "");
// Add new document
Document document = engine.AddDocument("InputForm.pdf");
// Append new page to the document
Page page = document.GetPage(0);
// Get control list
ControlList controlList = document.Controls;
// Get indices
uint editBoxNameIndex = controlList.GetIndexByName("editBoxName");
uint editBoxSurnameIndex = controlList.GetIndexByName("editBoxSurname");
uint checkBoxMarried = controlList.GetIndexByName("Married");
// Set values
controlList.SetValueByIndex(editBoxNameIndex, "John");
controlList.SetValueByIndex(editBoxSurnameIndex, "Doe");
controlList.SetValueByIndex(checkBoxMarried, "1");
// Save document
document.Save("FillForm.pdf");
// open generated PDF document in default PDF viewer installed in Windows
Process.Start("FillForm.pdf");
}
}
}
Download example source code: bytescoutpdf_fill_pdf_form_text_and_checkboxes.zip (10 KB)
Tutorials: