We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to fill continuous page number in pdf form field

How to fill continuous page number in pdf form field ?

 

you can fill forms in continuous pages using their names or through indexes which is loaded from document.Form property. There is no need of caring about page numbers to fill the form.

Please refer the code snippet to fill the forms in continuous pages :

C#:

//Load the template document

PdfLoadedDocument doc = new PdfLoadedDocument(Form.pdf");

PdfLoadedForm form = doc.Form;

// fill the fields from the first page

(form.Fields["f1-1"] as PdfLoadedTextBoxField).Text = "1";

(form.Fields["f1-2"] as PdfLoadedTextBoxField).Text = "1";

(form.Fields["f1-3"] as PdfLoadedTextBoxField).Text = "1";

(form.Fields["f1-4"] as PdfLoadedTextBoxField).Text = "3";

(form.Fields["f1-5"] as PdfLoadedTextBoxField).Text = "1";

(form.Fields["f1-6"] as PdfLoadedTextBoxField).Text = "1";

(form.Fields["f1-7"] as PdfLoadedTextBoxField).Text = "22";

(form.Fields["f1-8"] as PdfLoadedTextBoxField).Text = "30";

(form.Fields["f1-9"] as PdfLoadedTextBoxField).Text = "John";

(form.Fields["f1-10"] as PdfLoadedTextBoxField).Text = "Doe";

(form.Fields["f1-11"] as PdfLoadedTextBoxField).Text = "3233 Spring Rd.";

(form.Fields["f1-12"] as PdfLoadedTextBoxField).Text = "Atlanta, GA 30339";

(form.Fields["c1-1[0]"] as PdfLoadedCheckBoxField).Items[0].Checked = true;

(form.Fields["c1-1[1]"] as PdfLoadedCheckBoxField).Items[0].Checked = true;

// fill the fields from the second page

(form.Fields["f2-1"] as PdfLoadedTextBoxField).Text = "3200";

(form.Fields["f2-2"] as PdfLoadedTextBoxField).Text = "4850";

(form.Fields["f2-3"] as PdfLoadedTextBoxField).Text = "0";

(form.Fields["f2-4"] as PdfLoadedTextBoxField).Text = "500";

(form.Fields["f2-5"] as PdfLoadedTextBoxField).Text = "500";

(form.Fields["f2-6"] as PdfLoadedTextBoxField).Text = "800";

(form.Fields["f2-7"] as PdfLoadedTextBoxField).Text = "0";

(form.Fields["f2-8"] as PdfLoadedTextBoxField).Text = "0";

(form.Fields["f2-9"] as PdfLoadedTextBoxField).Text = "3";

(form.Fields["f2-10"] as PdfLoadedTextBoxField).Text = "3";

(form.Fields["f2-11"] as PdfLoadedTextBoxField).Text = "3";

(form.Fields["f2-12"] as PdfLoadedTextBoxField).Text = "2";

doc.Save("sample.pdf");

                                                                                                                                                                         Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/PdfFormFill53086348.zip

Article ID: Published Date: Last Revised Date: Platform: Control:
5536 10/30/2015 10/30/2015 Windows Forms PDF
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.