Articles in this section
Category / Section

How to fill continuous page number in pdf form field?

2 mins read

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: https://www.syncfusion.com/downloads/support/directtrac/general/PdfFormFill53086348.zip.


Note:

Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or the NuGet feed, include a license key in your projects. Refer to the link to learn about generating and registering the Syncfusion® license key in your application to use the components without a trial message.

 

Conclusion:

I hope you enjoyed learning about how to fill continuous page number in pdf form field.

 

You can refer to our Flutter PDF feature tour page to learn about its other groundbreaking features and documentation, and how to quickly get started with configuration specifications. You can also explore our Flutter PDF Flutter PDF examples to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to explore our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied