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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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 WinForms PDF
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon