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. Image for the cookie policy date

How to load date fields inside a pdf?

I know to use PdfLoadedTextBoxField for loaded text boxes but what do I use for loading date fields?  Any help would be appreciated.  This is being done in C#.

3 Replies

SL Sowmiya Loganathan Syncfusion Team September 7, 2017 07:05 AM

Hi Sam Dyse, 

We do support loading date fields from XFA Forms in Windows Platform using PdfLoadedXfaDateTimeField.  
Please check the below link to load date fields from existing XFA document : 

Please let us know if you need further assistance on this. 

Sowmiya L 

SD Sam Dyse September 7, 2017 08:35 AM

Is XFA the only way?  Here's a snippet of my code:

(form.Fields["f1_1"] as PdfLoadedTextBoxField).Text = sFullName;

(form.Fields["f1_5"] as PdfLoadedTextBoxField).Text = sFullName + ", " + sStreetAddr + ", " + sCity + ", " + sState + ", " + sZip;

(form.Fields["c1_6"] as PdfLoadedCheckBoxField).Checked = true;

(form.Fields["c1_1[0]"] as PdfLoadedCheckBoxField).Checked = true;

//This is where I want to load the date field
(form.Fields["Date1"] as PdfLoaded).Text = DateTime.Today.ToShortDateString();

SL Sowmiya Loganathan Syncfusion Team September 8, 2017 06:43 AM

 Hi Sam Dyse, 

We have created the simple sample to load the date field(TextBoxField) as PdfLoadedTextBoxField and modify the properties of that field in WindowsForms platform using PDF forms. Please find the sample from the below location. 
Please run the sample and check whether your requirement achieved at your end. Let us know if you need further assistance. 

Sowmiya L 

Live Chat Icon For mobile
Up arrow icon